使用nodemailer,以QQ邮箱发送邮件踩到的坑

根据nodemailer官网的配置进行配置

  // create reusable transporter object using the default SMTP transport
  let transporter = nodemailer.createTransport({
    host: "smtp.qq.email", // 邮箱后缀
    port: 587,
    secure: false, // true for 465, false for other ports 
    auth: {
      user: 'xxxxxxxxx@qq.com', // generated ethereal user(邮箱账号)
      pass: 'xxxxxxxxx' // generated ethereal password(邮箱密码)
    }
  });

  // send mail with defined transport object
  let info = await transporter.sendMail({
    from: '"Fred Foo 
上一篇:jdbc连接方法


下一篇:接口