简体   繁体   English

使用mailkit将新邮件移动到特定的imap文件夹

[英]moving new message to specific imap folder using mailkit


I have simply question. 我只是问一个问题。 Is it possible to send new message directly to specific IMAP folder using mailkit? 是否可以使用mailkit将新消息直接发送到特定的IMAP文件夹?
I previously used S22.Imap which work flawlessy but this library have strange issue with message body, it adds random carriage return sign to plain body text. 我以前使用的S22.Imap可以完美工作,但是该库在消息正文方面存在奇怪的问题,它在纯文本正文中添加了随机回车符。
In s22.imap this function is 在s22.imap中,此功能是

client.StoreMessage(MyMailMessage, False, box)    

Where client is IMAP client, MyMailMessage is net.Mail.MailMesssage and box is IMAP folder. 如果客户端是IMAP客户端,则MyMailMessage是net.Mail.MailMesssage,框是IMAP文件夹。
I don't want to send message to server and again recieve it te get unique uuid and finally move it to specific folder. 我不想将消息发送到服务器,然后再次接收它,以获得唯一的uuid,最后将其移动到特定的文件夹。 Maybe is better way to do this. 也许是更好的方法。
Thank you in advance for help. 预先感谢您的帮助。

Yes, literally everything is possible to do with MailKit :) 是的,实际上MailKit可以做所有事情 :)

client.Inbox.Append (message);

That will append the message to the Inbox. 这会将邮件附加到收件箱。

Same API exists for any other folder as well. 其他任何文件夹也都存在相同的API。

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

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