来自节点邮件程序消息中的属性始终无法通过用于创建帐户的默认帐户发送邮件

问题描述 投票:0回答:0
let message={
    from:email,
    to:emails,
    text:'Please join the meeting',
    subject:`You are Invited for ${meetingName}`,
    html:mail
}

上面是我的消息对象,from 属性不起作用。我想从登录用户发送电子邮件到他给的用户,但是节点邮件程序使用电子邮件(我的电子邮件是在 auth 配置的)它必须使用从标签中给出的电子邮件。

const config={
    service:'gmail',
    auth: {
        user:"[email protected]",
        pass: ""
      },
      port:465,
      host:'smtp.gmail.com'
   }

总是使用 [email protected] 而不是登录用户

express nodemailer
© www.soinside.com 2019 - 2024. All rights reserved.