This project is read-only.

Can't connect to any mail server

Topics: Help requests
Jul 27, 2015 at 3:20 AM
I am using the binary for .net 4.5 (downloaded 2.0.0.16) and I am not able to connect to neither one of the two servers I tried (POP or IMAP). My code is like this:
using (ImapX.ImapClient client = new ImapX.ImapClient(Server, Port, false))
                {
                    if (client.Connect())
                    {
                        if (client.Login(email, decryptedPassword))
                        {
                            // Do
                        }
                        else
                        {
                            // Login credentials failed
                            throw new ImapX.Exceptions.OperationFailedException(String.Format("Unable to log onto server \'{0}\', login {1}",
                                Server, email));
                        }
                    }
                    else
                    {
                        // Unable to connect to server
                        throw new ImapX.Exceptions.OperationFailedException(String.Format("Unable to connect onto server \'{0}\'",
                            Server));
                    }
                }               
Fairly similar to what is found here and here.

My server's address is the same as to what I have on Outlook and the port is 110 (tried my Gmail account on 995 and that didn't work either).

What am I doing wrong?
Jul 27, 2015 at 5:36 AM
Edited Jul 27, 2015 at 6:37 AM
I got it to work dropping the port number and useSSL parameters. Not sure why I can't specify those.

BTW, I just realized I haven't place this under the "Issues" section. My mistake, sorry.