+1 vote

Based on our understanding, Mail.dll connects to mailbox using POP3S (over 995) and POP3 (over 110).

Please let us know if we will be able to connect to mailbox using a different port. Thanks!

retagged by

1 Answer

0 votes
Best answer

Yes you can do that.

You need to use overloaded versions of Connect or ConnectSSL methods, that take port as a parameter:

using(Pop3 pop3 = new Pop3())
    pop3.ConnectSSL("pop3.server.com", 995);

    pop3.UseBestLogin("user", "password");

    List<string> uids = pop3.GetAll();
    foreach (string uid in uids)
        IMail email = new MailBuilder()
        string subject = email.Subject;
by (293k points)