1
我使用C#和AE.Net.Mail庫從Gmail提取文件。我遇到大型zip文件的問題。AE.Net.Mail Imap部分提取
同樣的問題的描述和使用Java這裏解決:JavaMail BaseEncode64 Error
有誰知道如何設置與C#和AE.Net.Mail庫部分獲取的標誌?
我使用C#和AE.Net.Mail庫從Gmail提取文件。我遇到大型zip文件的問題。AE.Net.Mail Imap部分提取
同樣的問題的描述和使用Java這裏解決:JavaMail BaseEncode64 Error
有誰知道如何設置與C#和AE.Net.Mail庫部分獲取的標誌?
跟着(或看看)S22.Imap。這是一個AE.Net.Mail記錄了一些額外的。
從例子:下載附件,只有當他們是小於2兆字節
using System;
using S22.Imap;
namespace Test {
class Program {
static void Main(string[] args)
{
using (ImapClient Client = new ImapClient("imap.gmail.com", 993,
"username", "password", Authmethod.Login, true))
{
// This returns all messages sent since August 23rd 2012
uint[] uids = Client.Search(
SearchCondition.SentSince(new DateTime(2012, 8, 23))
);
// Our lambda expression will be evaluated for every MIME part
// of every mail message in the uids array
MailMessage[] messages = Client.GetMessages(uids,
(Bodypart part) => {
// We're only interested in attachments
if(part.Disposition.Type == ContentDispositionType.Attachment)
{
Int64 TwoMegabytes = (1024 * 1024 * 2);
if(part.Size > TwoMegabytes)
{
// Don't download this attachment
return false;
}
}
// fetch MIME part and include it in the returned MailMessage instance
return true;
}
);
}
}
}
}
我只是想'SentSince'搜索過濾器上Yandex的郵箱,它不能正常工作 - 返回我的所有電子郵件。不一定是圖書館的錯 – chester89