0 votes

Keep getting this error when I use Connect or ConnectSSL to read POP email from GoDaddy. The Server address is "pop.secureserver.net" and I am using my correct login credentials.

System.Net.Sockets.SocketException
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 72.167.218.192:110

Has anyone experienced this with GoDaddy?

by (200 points)

1 Answer

0 votes

If your server requires SSL, use ConnectSSL method and don't specify port yourself:

using(Pop3 pop3 = new Pop3())
{
    pop3.ConnectSSL("pop.secureserver.net");
    pop3.UseBestLogin("user", "password");
    List<string> uids = pop3.GetAll();
    foreach (string uid in uids)
    {
        IMail email = new MailBuilder()
            .CreateFromEml(pop3.GetMessageByUID(uid));
        Console.WriteLine(email.Subject);
    }
    pop3.Close();
}          
by (276k points)
...