简体   繁体   English

MailKit SMTP复制电子邮件到Exchange Server发送的文件夹

[英]MailKit smtp copy emails to exchange server sent folder

I'm using the Mailkit framework to send (SMTP) and retrieve (IMAP) emails from an exchange server and that works fine. 我正在使用Mailkit框架从交换服务器发送(SMTP)和检索(IMAP)电子邮件,并且工作正常。

Yet, I have the problem that emails that are sent with SMTP don't show up in the sent folder on the server (and therefore not in other mail clients and that's the main problem). 但是,我有一个问题,即使用SMTP发送的电子邮件没有显示在服务器上的已发送文件夹中(因此没有显示在其他邮件客户端中,这是主要问题)。

Is there a way to get these SMTP sent emails to the sent folder on the exchange server? 有没有办法将这些SMTP发送的电子邮件发送到交换服务器上的已发送文件夹?

What mail clients such as Outlook, Thunderbird, etc all do is that once the message has been sent via SMTP, they append the message to the "sent" folder on the IMAP server. 邮件客户端(例如Outlook,Thunderbird等)所做的就是,一旦通过SMTP发送了邮件,便会将邮件附加到IMAP服务器上的“已发送”文件夹中。

Once you get the appropriate Sent folder from the IMAP server, you just need to call the Append() method like this: 从IMAP服务器获得适当的“已发送”文件夹后,您只需要像下面这样调用Append()方法:

sent.Append (message);

Note: There is no need to open the sent folder first. 注意:无需先打开发送的文件夹。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM