1

I have tried setting SMTP configuration for my webmail. I have used following settings for configuration

Username:   xyz@mydomain.in
Password:   Use the email account’s password.
Incoming Server:    a2plcpnl0234.prod.iad2.secureserver.net
                    IMAP Port: 993
                    POP3 Port: 995
Outgoing Server:    a2plcpnl0234.prod.iad2.secureserver.net
                    SMTP Port: 465

When I tried with these settings I get time out error/Failure sending mail. Below is the c# code

  SmtpClient smtp = new SmtpClient();
  smtp.Host = "webmail.mydomain.in";
  smtp.UseDefaultCredentials = true;
  smtp.EnableSsl = true;
  System.Net.NetworkCredential credentials = new System.Net.NetworkCredential();
  credentials.UserName = "xyz@mydomain.in";
  credentials.Password = "mypasword";
  smtp.Credentials = credentials;
  smtp.Port = 465;
veena hosur
  • 147
  • 2
  • 10

1 Answers1

0

If time out is the issue then add

 SmtpClient smtp = new SmtpClient();
  smtp.Timeout = 1200000;

mostly it will fix the issue

Updated as per the comment

Please refer the link

Community
  • 1
  • 1
Binoy Kumar
  • 422
  • 3
  • 17
  • for gmail SMTP its working without timeout.If I use above settings its showing errors.I think problem with settings.So is there any mistake in above configuration – veena hosur May 04 '17 at 07:08
  • 1
    @veenahosur I have added a link in my answer please go through it.But the key is debugging and finding what is the real issue – Binoy Kumar May 04 '17 at 08:31