我正在尝试使用Office365 SMTP通过Nodemailer(在MEANjs支架中)发送电子邮件,但是出现以下错误:
[Error: 140735277183760:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:795:]
我正在使用以下Nodemailer选项:
{
host: 'smtp.office365.com',
port: '587',
auth: { user: 'xxxx', pass: 'xxxx' },
secure: 'false',
tls: { ciphers: 'SSLv3' }
}
删除tls字段没有任何区别。我想念什么?
解决方案很简单。“安全”字段应为“ secureConnection”。生成配置的MEANjs支架使用“安全”字段创建了邮件选项。其余的选项都很好。对于需要正常工作的Office365 SMTP nodemailer选项块的任何人,以下应该都可以工作:
{
host: 'smtp.office365.com',
port: '587',
auth: { user: 'xxxx', pass: 'xxxx' },
secureConnection: false,
tls: { ciphers: 'SSLv3' }
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句