小编kis*_*zod的帖子

我应该使用什么类型的电子邮件才能使 Nodemailer 不被阻止

我试图找出问题所在,但一切都配置正确。我使用gmail,但是当我部署我的nodejs网站时,立即被阻止。在我尝试 Outlook 电子邮件后,设置遇到了一些问题,但在本地主机上工作,并且也在服务器上工作。过了一天,当我想尝试时,也被阻止了。当网站位于服务器上时有人想要发送电子邮件时,我应该使用什么类型的电子邮件,该电子邮件是免费的,并且与 Nodemailer 完美配合且不会阻塞?

\n

\r\n
\r\n
let transporter = nodemailer.createTransport({\n      host: "smtp-mail.outlook.com",\n      secureConnection: false,\n      port: 587,\n      tls: {\n        ciphers:\'SSLv3\'\n      },\n      auth: {\n        user: \'example@outlook.com\',\n        pass: \'xxxx\'\n      }\n    });\n\n  let mailOptions = {\n    from: \'<example@outlook.com>\',\n    to: \'example@outlook.com\',\n    subject: \'Bek\xc3\xbcld\xc3\xb6tt recept: \' + req.body.recipename,\n    text: \'\',\n    html: "",\n    attachments: [{\n      filename: imageName,\n      path: newuploadPath\n    }]\n  };
Run Code Online (Sandbox Code Playgroud)\r\n
\r\n
\r\n

\n

smtp node.js express nodemailer

3
推荐指数
1
解决办法
5331
查看次数

标签 统计

express ×1

node.js ×1

nodemailer ×1

smtp ×1