简体   繁体   English

Nodemailer与我公司的电子邮件

[英]Nodemailer with my company's email

I use nodemailer to send email to my users, previously I used gmail and it work just fine, but now, Im my custom email which provided by gmail 我使用nodemailer向我的用户发送电子邮件,之前我使用gmail,并且工作正常,但是现在,我是由gmail提供的我的自定义电子邮件

admin@example.io

Heres the code 继承人代码

var transporter = nodemailer.createTransport(smtpTransport({
  host : 'smtp.gmail.com',
  secureConnection : true,
  auth : {
    user: 'admin@example.io',
    pass: 'pass'
  }
}));

Since my custom account is from gmail, I expect the host to be stmp.gmail.com, but it shows this error 由于我的自定义帐户来自gmail,因此我希望主机为stmp.gmail.com,但它会显示此错误

{ [Error: Invalid login:]} {[错误:无效的登录名:]}

Im not sure what is the problem over here. 我不确定这是什么问题。

GoogleApps use the same smtp server. GoogleApp使用相同的smtp服务器。

Make sure your google apps administrator doesn't block SMTP relay service. 确保您的Google Apps管理员未阻止SMTP中继服务。 https://support.google.com/a/answer/2956491?hl=en https://support.google.com/a/answer/2956491?hl=zh_CN

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM