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()
.CreateFromEml(pop3.GetMessageByUID(uid));
string subject = email.Subject;
}
pop3.Close();
}