簡體   English   中英

如何使用 gmail smtp 主機解決 smtpjs 錯誤

[英]How to solve the smtpjs error with gmail smtp host

我正在使用 smptjs 使用 javascript 發送電子郵件。 代碼運行良好,直到今天早上。

我收到錯誤“僅支持彈性電子郵件作為 SMTP 主機。要開設帳戶,請訪問https://elasticemail.com/account#/create-account?r=20b444a2-b3af-4eb8-bae7-911f6097521c”

我試圖搜索此錯誤但未成功,我們將不勝感激。

這是我發送電子郵件的 js 代碼

const name = form.elements["name"].value;
const from = form.elements["email"].value;
const companyName = form.elements["company-name"].value;
const businessType = form.elements["business-type"].value;
const isOperatingBusiness = form.elements["business"].value;

const emailBody = `<h3>Please find the details below</h3>
<hr />
<span><strong>Name:</strong> ${name}</span><br />
<span><strong>Email Address:</strong>  ${from}</span><br />
<span><strong>Contact No:</strong>  ${phone}</span><br />
<span><strong>Company Name:</strong> ${companyName}</span><br />
<span><strong>Operating Business:</strong>  ${isOperatingBusiness}</span><br />
<span><strong>Business Type:</strong>  ${businessType}</span><br /><br />
<span>Thank you,</span><br />
<span>appiGo Team</span>`;

const emailObject = {
      Host: HOST,
      Username: USERNAME,
      Password: PASSWORD,
      To: DEV_MAIL,
      From: FROM,
      Subject: `${subject} ${name}`,
      Body: emailBody,
};

Email.send(emailObject).then((message) => {
      if (message == "OK") return onSuccess();
});

提前謝謝你!

不幸的是,由於濫用(垃圾郵件/網絡釣魚),SMTPJS.com 僅限於受信任的 SMTP 提供商。 目前推薦的 SMTP 提供商是 ElasticEmail,未來可能會考慮其他 SMTP 提供商。

Elastic Email 是一家電子郵件服務提供商,您可以在此處創建免費試用帳戶https://elasticemail.com/account#/create-account以訪問電子郵件傳遞引擎和 SMTP 中繼。 通過試用,您每天最多可以發送 100 封電子郵件。 如需更多,您必須付費。

這可能是 smptjs 現在唯一的選擇。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM