我正在使用 Mailkit 阅读来自 Ms Exchange 帐户的电子邮件。 一切正常,但如果 corm\john.doe 有两个邮箱“[email protected]”和“[email protected]”怎么办?
Mailkit流程中没有邮箱地址参数
using (var client = new ImapClient ()) {
client.Connect ("imap.corp.com", 993, SecureSocketOptions.SslOnConnect);
client.Authenticate ("corp\\john doe", "password");
client.Inbox.Open (FolderAccess.ReadOnly);
var uids = client.Inbox.Search (SearchQuery.All);
foreach (var uid in uids) {
var message = client.Inbox.GetMessage (uid);
// write the message to a file
message.WriteTo (string.Format ("{0}.eml", uid));
}
client.Disconnect (true);
}
如何读取两个邮箱的消息?