Could not convert socket to TLS

Hello Everyone,
I’m using standalone Backendless on my server. Everything is fine except e-mail function.
I try the setup e-mail setting both ssl and tls.
TLS says : “Could not convert socket to TLS”
SSL says : Could not connect to SMTP host: smtp.gmail.com, port: 587
My server e-mail functionality working properly. I’m using custom email’s with google apps.
Thank you.

Could you describe when and where exactly you see these errors?

When i want to setup app e-mail settings on Manage → App Settings → Email Settings.

Capture.PNG

Does the problem happen when you click Save or Test?

When i click test button. Save button says : “E-Mail settings saved” but not working.

Ok. Where do you see these errors then:

TLS says : "Could not convert socket to TLS"
SSL says : Could not connect to SMTP host: smtp.gmail.com, port: 587

Mark

Red info popup appears on the top right on the screen.

if i choose security to TLS “Could not convert socket to TLS”.
SSL says : Could not connect to SMTP host: smtp.gmail.com, port: 587

any update?

I would like to ask for very detailed step-by-step description of what you’re doing. The info you provided is confusing. For example, you say:

When i click test button. Save button says : "E-Mail settings saved"

Then you write:

Red info popup appears on the top right on the screen

So does the popup appears when you do something else? If so, then what is it you do?

First of all, sorry for confusing you.
Step by step,
I created an application and wanted to use email features.
So, I fill the email properties (manage -> email settings ) and then press the test botton and throw the red popup error. I explained before detailed error text also with screen shot.

If I am not explain myself again, I’ll give up :slight_smile:

Thanks, Habil. Is Standalone Backendless running in a virtual machine or on a physical computer?

Virtual machine, on CentOs operating system.

Do the network settings of the virtual machine allow outbound connections? Can you ping the google host from the VM? Here’s a discussion that talks about using curl to diagnose connectivity to gmail:

Yes, I can ping to google.com host from the VM. but when i ping to following command “curl smtps://smtp.gmail.com:465 -v” it says “Protocol smtps not supported or disabled in libcurl
curl: (1) Protocol smtps not supported or disabled in libcurl”.

How can i fix it?

You need to make sure that a socket can be opened to smtp.gmail.com on port 465. Can you verify that somehow?

I fixed the problem with VM provider. I think problem is related with VM e-mail configurations. By the way outlook smtp settings working perfectly.

Thank you Mark.

Hello.

I got the same situation with standalone for Windows and my MS Exchange server.
I used different ports: 25 and 587. Both should work with TLS. These ports aren’t blocked and host ip is allowed on Exchange server. Sending by telnet from Backendless hosting VM works fine.
But when I try to save email settings or test them it shows exception popup" Could not convert socket to TLS"

Andrey,

To get support for the Standalone Backendless please consider purchasing a support plan, we do not provide free support for the Standalone installations.

Regards,
Mark

Andrey, have you solved the problem?

Couldn’t connect to host, port: smtp@gmail.com, 587; timeout 5000