简体   繁体   中英

How to get mail sent successfully with MailKit IMap?

I'd like to know if my outbox mail has been sent successfully..

var client = new ImapClient();
....
var folders = client.GetFolders(client.PersonalNamespaces[0]);
var folder = client.GetFolder("已发送");//get sent mail floder in Chinese
var folderAccess = folder.Open(FolderAccess.ReadOnly);
string path = @"C:\temp\";

for (int i = folder.Count - 1; i >= 0; i--)
{
   var message = folder.GetMessage(i);
}

You can't send messages via IMAP, you can only send them via SMTP.

Sending messages via SMTP do not put them into any IMAP folder. You have to put them there yourself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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