How to upload copy of sent with smtp email

huangapple go评论144阅读模式
英文:

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

我们已经实施了以下方法,并且对我们有效:

  1. 使用SMTP发送电子邮件,并将其密送到自己的电子邮件地址。
  2. 使用IMAP将电子邮件移动/上传到已发送文件夹。
  3. 对于轮询新消息,使用自动递增的UID,因此只需记住上次处理的UID,并下载大于该UID的所有消息。
英文:

We've implemented the following approach and it works for us:

  1. Send email with smtp and bcc to own email.
  2. Move/upload email with imap to sent folder.
  3. For polling new messages use UID which is auto increment, so just remember the last processed and download all that is more than that.

huangapple
  • 本文由 发表于 2022年7月28日 13:24:07
  • 转载请务必保留本文链接:https://go.coder-hub.com/73147643.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定