Hello,
First thing that I don't know whether I can authenticate GoDaddy account with IMAP.
I have windows application. I have following flow.
Step 1- Check ports with domain name
using (Imap client = new Imap())
{
client.ServerCertificateValidate += new ServerCertificateValidateEventHandler(Validate);
IAsyncResult result = client.BeginConnectSSL("webmail.myserver.com");
bool success = result.AsyncWaitHandle.WaitOne(2500, true);
client.EndConnect(result);
}
Step 2- If port is working fine, use IMAP to login
try
{
if(993)
{
using (Imap client = new Imap())
{
client.ServerCertificateValidate += Validate;
client.ConnectSSL("webmail.myserver.com");
client.UseBestLogin(emailId, password);
}
}
else
{
using (Imap client = new Imap())
{
client.ServerCertificateValidate += Validate;
client.Connect("webmail.myserver.com");
client.Login(emailId, password); //get error from here
}
}
}
catch(Exception ex){}
In Step 1, both port get success. But in step 2, it goes in catch with exception of "AUTHENTICATION fail". There is no further message.