[英]Nodemailer send mail using gmail account showing response code 534-5.7.14
// create reusable transporter object using the default SMTP transport
transporter = nodemailer.createTransport({
host: 'smtp.gmail.com',
port: 465,
secure: true,
auth: {
user: 'yourEmail',
pass: 'yourPassword'
}
});
{ [錯誤:無效登錄] 代碼:'EAUTH',響應:'534-5.7.14 請通過您的 web 瀏覽器登錄,然后\n534-5.7.14 然后重試。\n534-5.7.14 在 n534 5.7 了解更多信息.14 https://support.google.com/mail/answer/78754 77sm13524842wml.20 - g smtp', responseCode: 534 }
您可能需要在您的 Gmail 帳戶中“允許不太安全的應用程序”(一直在底部)。 您可能還需要“允許訪問您的 Google 帳戶”。
var transporter = nodemailer.createTransport(smtpTransport({
host: config.email_config.SMTP_HOST,
port: config.email_config.SMTP_PORT,
tls: {
rejectUnauthorized: false
},
auth: {
user: config.email_config.SMTP_AUTH_USER,
pass: config.email_config.SMTP_AUTH_PASS
}
}));
use like thiss....
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.