I'm having a behaviour with nodemailer
when updated my nodejs
version to 12
.
Now, when I'm trying to send emails, I get:
DEBUG Creating transport: nodemailer (6.1.1; +https://nodemailer.com/; SMTP/6.1.1[client:6.1.1])
DEBUG Sending mail using SMTP/6.1.1[client:6.1.1]
DEBUG [9mzLKQAwcwQ] Resolved mail.mycompany.com as xxx.xxx.xxx.xxx [cache miss]
INFO [9mzLKQAwcwQ] Connection established to xxx.xxx.xxx.xxx:587
DEBUG [9mzLKQAwcwQ] S: 220 mail.mycompany.com ESMTP
DEBUG [9mzLKQAwcwQ] C: EHLO [127.0.0.1]
DEBUG [9mzLKQAwcwQ] S: 250-mail.mycompany.com
DEBUG [9mzLKQAwcwQ] S: 250-STARTTLS
DEBUG [9mzLKQAwcwQ] S: 250-PIPELINING
DEBUG [9mzLKQAwcwQ] S: 250-8BITMIME
DEBUG [9mzLKQAwcwQ] S: 250-SIZE 23068672
DEBUG [9mzLKQAwcwQ] S: 250 AUTH LOGIN PLAIN CRAM-MD5
DEBUG [9mzLKQAwcwQ] C: STARTTLS
DEBUG [9mzLKQAwcwQ] S: 220 ready for tls
ERROR [9mzLKQAwcwQ] 139673645745984:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1922:
ERROR [9mzLKQAwcwQ]
DEBUG [9mzLKQAwcwQ] Closing connection to the server using "end"
ERROR Send Error: 139673645745984:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1922:
ERROR
[Error: 139673645745984:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1922:
] {
library: 'SSL routines',
function: 'ssl_choose_client_version',
reason: 'unsupported protocol',
code: 'ESOCKET',
command: 'CONN'
}
INFO [9mzLKQAwcwQ] Connection closed
INFO [9mzLKQAwcwQ] Connection closed
This is my SMTP transport config:
nodemailer.createTransport({
host: 'mail.mycompany.com',
port: 587,
debug: true,
logger: true,
tls: {
secure: false,
ignoreTLS: true,
rejectUnauthorized: false
},
auth: {
user: 'user',
pass: 'pass'
}
})
If I change to the latest's nodejs release of v11: 11.15.0
, everything works again. Only this happens on v>12
, 'cause I have tried with 12.1.0
& 12.2.0
and got the same error described above.
Someone experimenting same behaviour? Suggestions?
NOTE: I have nodemailer
updated to the latest version 6.1.1
as I said on the Q'title.