I am trying to send email using my Zoho email but its throwing exception. Below is my code in c# and error details:
SmtpClient smtpClient = new SmtpClient();
smtpClient.Host = "smtp.zoho.com";
smtpClient.Port = 465;
smtpClient.EnableSsl = true;
smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
smtpClient.UseDefaultCredentials = true;
smtpClient.Credentials = new System.Net.NetworkCredential("
XXXXXX@XXXX.sg", "******");
MailMessage message = new MailMessage();
message.Subject = "Test Subject";
message.IsBodyHtml = true;
message.Body = "Message body...";
smtpClient.Send(message);
The error which we are getting :
-------------------------------
The operation has timed out.
I am not sure how to make it happen. I have checked and can send email using zoho site which means email is working well.