0 votes

We've recently migrated to office365.com. I am trying to connect to a POP3 email account there using SSL. On the line pop3.ConnectSSL(...), I get an error that says "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." I can sign into this email account via their web UI. Here is the code I am trying. What am I doing wrong?

        Dim username = "username"
        Dim password = "password"
        Using pop3 As New Pop3()
            pop3.ConnectSSL("outlook.office365.com", 995)
            pop3.Login(username, password)

            Dim builder As New MailBuilder()
            For Each uid As String In pop3.GetAll()
                Dim eml = pop3.GetMessageByUID(uid)
                Dim email As IMail = builder.CreateFromEml(eml)
                Console.WriteLine("subject: {0}", email.Subject)
        End Using

1 Answer

0 votes

There is no need to specify port explicitly ConnectSSL("outlook.office365.com") uses default port for POP3 over SSL.

Your code is correct. I've just check and those settings are also correct - I'm able to connect.

Either you experienced office365 failure or this is your network problem.

by (288k points)