獲取附件我使用AE.NET使用IMAP從Gmail中獲取郵件。我能夠獲取消息,但是當我嘗試迭代消息附件時,沒有消息附件。回到message.Value.Attachments.Count()給了我0.1請參閱下面我的代碼:使用Gmail的AE.NET不工作
using (var imap = new AE.Net.Mail.ImapClient("imap.gmail.com", mailAccount.UserName, mailAccount.Password, AE.Net.Mail.ImapClient.AuthMethods.Login, 993, true))
{
//Get all new messages
var msgs = imap.SearchMessages(
SearchCondition.Unseen()
);
string ret = "";
foreach (var message in msgs)
{
foreach (var attachment in message.Value.Attachments)
{
//Save the attachment
}
}
}
正如我說我已經登錄的附件與郵件的主題計數一起,並相信該郵件是但是他們沒有附件,這是不正確的,因爲我可以在Gmail中看到附件。
任何幫助,這是非常讚賞。