SSL with .NET SmtpClient use port 587 for the Comcast SMTP server

I recommend

I’m finding that SMTP is a bit of a nightmare. The blog software I’m using uses the .NET System.Net.Mail.SmtpClient class to send email using SSL. Trying to send email through my Yahoo or Comcast SMTP server would continually timeout.

It works fine if not using SSL, but I really do not want to send my email password base 64 encoded across the internet! In fact, beware using email clients that are not using SSL or at least CRAM MD5 for SMTP authentication.

I tried to send email using SSL using port 465 to both the Yahoo and Comcast SMTP server without success. To troubleshoot the problem I wrote a small console application to use the SmtpClient to send email. I tried every variation I could think of to no avail.

After a lot of web searching I found a post which alerted me to the possibility of using SSL with gMail using port 587

I tried port 587 on the Yahoo SMTP server, but it is not configured for SSL. I was finally successful sending an email using SSL with the Comcast SMTP server on port 587.  Of course, this was after hours and hours of frustration!

I never could get the Yahoo SMTP server to work. The SendEmail call hangs and finally times out. Maybe there exists another port that will work, but I decided to drop it for now.

Technical September 26, 2009


Comments