英文:
How to upload copy of sent with smtp email
问题
我使用go-mail库通过smtp发送电子邮件。但是我遇到了一个常见的问题,发送的邮件不会出现在已发送文件夹中。通过搜索,我发现解决这个问题的唯一方法是通过imap上传已发送的电子邮件。
问题是如何通过smtp电子邮件获取已发送电子邮件的副本?
英文:
I use go-mail library to send emails with smtp. But I faced common issue that sent emails won't appear in sent folder. Googling I found that the only way to solve it is to upload sent email though imap.
The question is how do I obtain copy of sent email with smtp email?
答案1
得分: 0
你无法获取通过SMTP邮件发送的副本。SMTP只用于传递邮件,没有用户邮箱的概念,也没有特定的"已发送"文件夹。
英文:
> The question is how do I obtain copy of sent email with smtp email?
You can't. SMTP is just for delivering mail. There is no concept of users mailboxes and specifically the Sent folder within SMTP.
答案2
得分: 0
我们已经实施了以下方法,并且对我们有效:
- 使用SMTP发送电子邮件,并将其密送到自己的电子邮件地址。
- 使用IMAP将电子邮件移动/上传到已发送文件夹。
- 对于轮询新消息,使用自动递增的UID,因此只需记住上次处理的UID,并下载大于该UID的所有消息。
英文:
We've implemented the following approach and it works for us:
- Send email with smtp and bcc to own email.
- Move/upload email with imap to sent folder.
- For polling new messages use UID which is auto increment, so just remember the last processed and download all that is more than that.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论