[英]Error when using smtpJs to send email (JavaScript)
當我嘗試使用 smtpJS 發送電子郵件時出現錯誤:
“SMTP 服務器需要安全連接或客戶端未通過身份驗證。服務器響應為:5.7.0 需要身份驗證。了解更多信息(不要出現任何鏈接)。”
我的電子郵件上有安全通知,但沒有發送任何內容,我已經在我的 gmail 上啟用了“安全性較低的應用程序”,但沒有再發生,所以,我不知道該怎么做。
PS:我已經嘗試使用 nodemailer,但是沒有 T_T
Email.send({
Host: "smtp.gmail.com",
Username: "<email>",
Password: "<password>",
To: "example@gmail.com",
From: "example@gmail.com",
Subject: "Test email",
Body:
"<html><h2>Header</h2><strong>Bold text</strong><br></br><em>Italic</em></html>",
}).then((message) => alert(message));
您是否嘗試過使用應用密碼: https : //support.google.com/accounts/answer/185833?hl=en
我自己使用應用程序密碼使用它,可能是谷歌的多級身份驗證。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.