2010-07-12 82 views
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); 
    } 

,但我应该在需要时出现的代理和授权怎么办?
谢谢你的帮助!

回答