0
我有以下任務:我應該閱讀從Gmail的電子郵件和計算機通過代理連接到互聯網。通常我會用mail.dll http://www.lesnikowski.com/mail這樣的:Mail.dll通過代理C#
using (Imap imap = new Imap())
{
imap.ConnectSSL(_server);
imap.Login(_user, _password);
// Select the Inbox folder, ou can also select other folders.
// E.g. Sent folder: imap.Select("Sent");
imap.SelectInbox();
// Find all unseen messages:
List<long> uidList = imap.Search(Flag.All);
// Download each message:
foreach (long uid in uidList)
{
IMail email = new MailBuilder().CreateFromEml(
imap.GetMessageByUID(uid));
// Display email data, save attachments:
ProcessMessage(email);
}
imap.Close(true);
}
,但我應該在需要時出現的代理和授權怎麼辦?
謝謝你的幫助!