gpt4 book ai didi

javascript - 如何解决gmail smtp host的smtpjs错误

转载 作者:行者123 更新时间:2023-12-05 03:24:48 26 4
gpt4 key购买 nike

我正在使用 smptjs 使用 javascript 发送电子邮件。代码在今天早上之前运行良好。

我收到错误“仅支持 elasticemail 作为 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 提供商。

关于javascript - 如何解决gmail smtp host的smtpjs错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72209946/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com