SMTP setup for local server

I am unable to send emails from local thinger server running on ubuntu server 16.04. I tried my private smtp server as well as gmail, noting worked… Below are the settings that are used, and logs:

The config file is:
“email” : {
“domain” : “xxx.xx”,
“type” : “smtp”,
“smtp” : {
“host” : “mail.xxx.xx”,
“port” : “587”,
“username” : “username@xxx.xx”,
“password” : “xxxx”,
“secure” : true
}
},

Log file shows that the connection can not be established:
2017-09-17T08:09:03.728358 debug [Email Interface] Sending email to 'test@xxx.xx using SMTP interface
2017-09-17T08:09:03.728461 trace [Server Module] [SMTP] Instance Registered
2017-09-17T08:09:03.728480 info [SMTP] Sending email from no-reply@xxx.xx to test@xxx.xx via SMTP server mail.xxx.xx:587
2017-09-17T08:09:03.729980 debug [SMTP] Initiating connection to mail.xxx.xxi:587 with SSL/TLS=true
It remains stuck here…

I am using private SMTP server with TLS encryption on port 587. This work well with other applications that i’m using, e.g. sSMTP where i have
mailhub=smtp.xxx.xx:587
UseTLS=YES
UseSTARTTLS=YES
AuthUser=xxx
AuthPass=xxx

Any ideas what might be wrong and how to solve that? My suspicions is that “secure” : true does not enable TLS encryption…

Hi @tpetric, if you want to share a user account from your email domain (by private message), I can test it in more detail. It should be using the secure connection, as it is setting SSL/TLS=true in the log. Did you wait something more, i.e., 2 minutes to see if it doing a connection timeout? It should be posted in the log…

Regarding the ports of your SMTP server, and this stackoverflow topic:

Seems that port 587 requires STARTTLS command to upgrade to TLS secure connection. Does your SMTP server allows secure connections over port 465?

It does, but there is no difference in response, also no indication of a connection timeout…

Logs:
2017-09-17T11:44:37.600158 info [SMTP] Sending email from no-reply@xxx to tadej@xxx via SMTP server mail.xxx.xx:465
2017-09-17T11:44:37.600374 debug [SMTP] Initiating connection to mail.xxx.xxx:465 with SSL/TLS=true

I’m not sure if this is relevant, but these logs are generated, when i try to send email for password recovery.

I can share user account if you are willing to try. How do i send private massage ?

Hi @tpetric, just send me a private message by clicking in my profile image.