Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 我能';t通过Office 365 SMTP邮件服务器从我的服务器发送电子邮件_Node.js_Authentication_Outlook_Office365_Nodemailer - Fatal编程技术网

Node.js 我能';t通过Office 365 SMTP邮件服务器从我的服务器发送电子邮件

Node.js 我能';t通过Office 365 SMTP邮件服务器从我的服务器发送电子邮件,node.js,authentication,outlook,office365,nodemailer,Node.js,Authentication,Outlook,Office365,Nodemailer,我在node.js v12.13.9中使用nodemailer v6.2.1,我想通过Office 365 SMTP邮件服务器发送电子邮件,并使用starts。我使用这个配置: var transporter = nodemailer.createTransport({ host: 'smtp.office365.com', port: 587, tls:{ rejectUnauthorized: false }, auth: {

我在node.js v12.13.9中使用nodemailer v6.2.1,我想通过Office 365 SMTP邮件服务器发送电子邮件,并使用starts。我使用这个配置:

var transporter = nodemailer.createTransport({
   host: 'smtp.office365.com',
   port: 587,    
   tls:{
          rejectUnauthorized: false
   },
   auth: {
      user: username,
      pass: password
   }
});
当我执行“transporter.verify”时,我收到消息“无效登录:535.7.3身份验证失败[SC1P15201CA0003.LAMP152.PROD.OUTLOOK.COM]”

我是通过godaddy.com获得这项服务的,我可以使用outlook.com的用户和密码登录,没有问题;我也重置了密码,但无法登录。在godaddy,他们说问题出在Microsoft,而不是他们,这就是我尝试不同配置的原因,我仍然遇到相同的身份验证错误:

var transporter = nodemailer.createTransport({
   host: 'smtp.office365.com',
   port: 587,    
   secureConnection: false,
   auth: {
      user: username,
      pass: password
   },
   tls: {
      ciphers: 'SSLv3'
   }
});