Click here to Skip to main content
14,364,290 members
Rate this:
Please Sign up or sign in to vote.
Hi I am getting a time out when I try to send email with VB.net 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.
Posted
Comments
Richard MacCutchan 6-Nov-19 10:11am
   
Speak to the administrators of your SMTP host to check what you need to configure.
KentJ05 6-Nov-19 10:37am
   
Thanks, we did but everything is in order
remember we use that same mail server to send out ssl emails on port 465 many times a day with outlook 2016
Richard MacCutchan 6-Nov-19 11:06am
   
Well something is obviously not correct, but it is impossible for us to guess what. If you are not getting an error message or exception then you need to check the server logs to see if there is any message about connection failures.
ZurdoDev 8-Nov-19 11:42am
   
What he said. ^
Richard Deeming 8-Nov-19 13:15pm
   
You could try configuring a network trace log for your application, to see if that gives you any clues:
How to: Configure Network Tracing | Microsoft Docs[^]

Or use a tool like Wireshark to monitor the network traffic from your application.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




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