totaljs / framework

Node.js framework
http://www.totaljs.com
Other
4.36k stars 450 forks source link

Issue while trying send emails #712

Closed fgnm closed 5 years ago

fgnm commented 5 years ago

I'm trying to send emails through Amazon SES with my Total app running on EC2 instance. But I got some trouble with SSL. This is the error when I try to send an email:

======= 2019-06-18 13:27:14: mail-smtp ---> Error: 139861256759104:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:
 (email-smtp.eu-west-1.amazonaws.com) Error: 139861256759104:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:

This is my configuration:

// Mail settings
mail_smtp                       : email-smtp.eu-west-1.amazonaws.com
mail_smtp_options               : {"secure":true,"port":587,"user":"USERNAME","password":"PASSWORD","timeout":10000}

This is the official documentation from Amazon: https://docs.aws.amazon.com/en_us/ses/latest/DeveloperGuide/send-email-smtp-software-package.html

The port 2587 produce the same error, instead port 465 or 2465 successfully send the email. For months I've used 465 port to send emails, however I would like to use the port 587 because some problems with SES, and, as far as I understand well, the port 587 is a certified standard for sending emails.

petersirka commented 5 years ago

Can you send me some test account for testing? If yes, then please send me it on petersirka@gmail.com. Thank you!

fgnm commented 5 years ago

Do you mean an Amazon SES account?

petersirka commented 5 years ago

I mean SMTP credentials for testing... I need to debug the communication...

fgnm commented 5 years ago

Thanks to @petersirka the issue is fixed by removing secure flag from configuration.