Email server does not support secure connection [FIXED BY EXPERTS]

Milan Stanojevic
by Milan Stanojevic
Deputy Editor
Affiliate Disclosure

email server doesn't support secure connection
To fix various PC problems, we recommend DriverFix: This software will keep your drivers up and running, thus keeping you safe from common computer errors and hardware failure. Check all your drivers now in 3 easy steps:
  1. Download DriverFix (verified download file).
  2. Click Start Scan to find all problematic drivers.
  3. Click Update Drivers to get new versions and avoid system malfunctionings.
  • DriverFix has been downloaded by 0 readers this month.

A large number of users have reported having an issue when trying to use their written script to send emails through Gmail.

They report that the issue arises suddenly after using the same script for a long time:

This issue can be extremely annoying, especially if you need the script to run properly for a company or multiple users. This error message is caused by one of the following issues:

  • the connection settings are incorrect (wrong port specified)
  • the credentials provided are incorrect (username and password)

For these reasons in this article, we will explore some of the best methods to solve this problem, and be able to send emails using your scrip again. Please follow the steps closely to avoid any unnecessary issues.

What to do if Email server doesn’t support secure connection?

1. Change ‘client.port’ value

coding pc - email server does not support secure connection

  1. If you find yourself in the same situation as the user mentioned above, you will simply need to stop using port 25, and change it to port 465 or 587.
  2. Using port 587 is a security requirement for outgoing mail (SMTP) server for Gmail.  
  3. This method should solve your issue, but if the issue persists, follow the next method.

Looking for a fast and reliable email client? Try one of these applications!

2. Change the value of SmtpServer.EnableSsl

code - email server doesn't support secure connection
The code of your script should look like this :

 Dim client As New Net.Mail.SmtpClient("")
        client.Port = 587
        client.EnableSsl = True
        client.UseDefaultCredentials = False
        client.Credentials = loginInfo

Change the value of SmtpServer.EnableSsl from ‘true’ to ‘false’.

 SmtpServer.EnableSsl = true;

turns into:

SmtpServer.EnableSsl = false;

After changing this value, check to see if the issue persists. If it does, please follow the next method.

3. Change settings of your Gmail app

  1. In order to access the link provided in the next step, you will need to make sure you’re logged into your Gmail account
  2. Visit this link and activate the option ‘Access for less secure apps’.Less secure app access Gmail - email server doesn't support secure connection
  3. Retry running your script to check if the issue is resolved.

In this article, we explored some of the best methods to solve the issue caused by an error in the script for sending emails through Gmail.

Please feel free to let us know if this guide helped you solve your issue, by using the comment section below.


This article covers:Topics:

There are no comments yet. Please leave a comment

add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *