node.js - Error sending email using nodemailer via Office365 smtp (MEANjs scaffold) -
i'm trying use office365 smtp send email using nodemailer (in meanjs scaffold), following error:
[error: 140735277183760:error:140770fc:ssl routines:ssl23_get_server_hello:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:795:]
i'm using following nodemailer options:
{ host: 'smtp.office365.com', port: '587', auth: { user: 'xxxx', pass: 'xxxx' }, secure: 'false', tls: { ciphers: 'sslv3' } }
removing tls field doesn't make difference. missing?
the solution simple. 'secure' field should 'secureconnection'. meanjs scaffold generated configs created mailer options 'secure' field. rest of options fine. needs working office365 smtp nodemailer options block, following should work:
{ host: 'smtp.office365.com', port: '587', auth: { user: 'xxxx', pass: 'xxxx' }, secureconnection: false, tls: { ciphers: 'sslv3' } }