I am trying to send an email from a web form. The email service in our company is offered by the ISP (using our domain name) so I talked to them to get the correct information about how to contact the host (email server). The code I use to send the email is shown below but I get a timeout exception. Employees in our company use MS Outlook to send/receive email so I double checked the parameters and they are the same the ISP gave me.
SmtpClient objSmtpClient = new SmtpClient(); objSmtpClient.Host = "the ISP email server here"; objSmtpClient.Port = 465; objSmtpClient.EnableSsl = true; objSmtpClient.Credentials = new System.Net.NetworkCredential("an email account here", "password here"); objSmtpClient.Send(objMailMessage);
I have already tried several workarounds I have found searching the Internet without success.
I will very much appreciate your feedback.
Respectfully,
Jorge Maldonado