tags:

views:

17

answers:

0

Hello. I have the following task: I should read e-mails from gmail and the computer is connected to the internet through proxy. Normally I would use mail.dll http://www.lesnikowski.com/mail like this:

    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.SearchFlag(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);
    }

but what should I do when there's proxy and authorization required?
Thank you for your help!