我无法使用node.js中的nodemailer向yahoo用户发送邮件

问题描述 投票:-1回答:1

我正在尝试使用nodemailer向node.js中的GMail和Yahoo用户发送确认邮件。我试过这个:

nodemailer.createTransport("SMTP",
        {
                 service: 'gmail',
                 auth:
                 {
                        user: "[email protected]",
                        pass: "xxxx"
                 }
        });
 var message ={

                        from: 'XXX.com',
                        to:[email protected],
                        subject: 'Confirm your registration',

              }

它适用于Gmail,但我想发送雅虎所以我给了yahoo而不是service:Gmail,但显示以下错误:

来自命令的邮件失败 - 553来自未验证的地址 - 请参阅http://help.yahoo.com/l/us/yahoo/mail/original/manage/sendfrom-07.html

如何向雅虎发送邮件?

node.js yahoo nodemailer
1个回答
3
投票

您无需为其他目的地更改service。即如果你提供gmail登录凭据并向雅虎发送电子邮件,你的服务仍然是'gmail'。

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