Question

Nodemailer: ssl3_get_record:wrong version number

Posted March 1, 2021 2k views
Node.js

Hi guys!

I have the next issue when I try to use nodemailer to send an email, the application runs ok.

{ [Error: 140194420910976:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../ssl/record/ssl3_record.c:331:
] code: 'ESOCKET', command: 'CONN' }

I’ve done deployment in a VPS, the characteristics are the following:

  • Ubuntu 20.04 LTS
  • Nginx as a server web
  • Letsencrypt and certbot for ssl certificates
  • Node js v10.19.0
  • Nodemailer 6.5.0

The credentials about my smtp server are:

  • smtp.hostinger.mx
  • port 587
  • Support for SSL, TLS and STARTTLS

I have a laravel application running with the same credentials on my vps, it send emails ok, but when use it with node js, I get error that I mention.

I’ve read all documentation about nodemailer even using all recomendation, but error gets block me.

Please, if anyone has had this error before and was able to fix it, I will be very grateful.

Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!