我正在与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提供程序。
Elastic Email是一个电子邮件服务提供商,您可以在这里创建一个免费试用帐户https://elasticemail.com/account#/create-account以访问电子邮件发送引擎和SMTP中继。通过试用,你可以每天发送多达100封邮件。
这可能是smptjs现在唯一的选择。