Click here to Skip to main content
14,390,153 members

Problem sending email using SSL

KentJ05 asked:

Open original thread
Hi I am getting a time out when I try to send email with using ssl.
It works fine if I disable SSl and use port 25. I have tried enabling SSL and using both port 465 and 587 and every time it times out when I try to send. We use this mail server to send out email with ssl on port 465 daily without any problem.

Any assistance would be greatly apricated

see smtp settings here:

'Setup SMTP Server
Dim Smtp = New SmtpClient

Smtp.Host = Company.SMTPServerName
Smtp.Port = Company.SMTPPort '465
Smtp.DeliveryMethod = SmtpDeliveryMethod.Network
Smtp.Credentials = New Net.NetworkCredential(Company.FromEmailAccount, Company.FromEmailPassword)
Smtp.EnableSsl = Company.EnableSsl ' true

What I have tried:

I have tried using both port 465 and 587 and every time it times out when I try to send.
Tags: VB.NET, SSL, SmtpClient


When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the The Code Project Open License (CPOL).

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100