admin管理员组

文章数量:1315952

I am working with smptjs to send email using javascript. The code was working fine until today morning.

I am getting the error "Only elasticemail is supported as an SMTP host. To open an account please visit ;

I tried to search for this error and unsuccessful, any help in this matter would be appreciated.

This is my js code to send the email

const name = form.elements["name"].value;
const from = form.elements["email"].value;
const panyName = form.elements["pany-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> ${panyName}</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();
});

Thank you in advanced!

I am working with smptjs to send email using javascript. The code was working fine until today morning.

I am getting the error "Only elasticemail is supported as an SMTP host. To open an account please visit https://elasticemail./account#/create-account?r=20b444a2-b3af-4eb8-bae7-911f6097521c"

I tried to search for this error and unsuccessful, any help in this matter would be appreciated.

This is my js code to send the email

const name = form.elements["name"].value;
const from = form.elements["email"].value;
const panyName = form.elements["pany-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> ${panyName}</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();
});

Thank you in advanced!

Share Improve this question asked May 12, 2022 at 3:53 AbdulAbdul 611 gold badge1 silver badge5 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 4

Unfortunately, due to abuse (spam / phishing) SMTPJS. has been limited to trusted SMTP providers. Currently the remended SMTP provider is ElasticEmail, other SMTP providers may be considered in future.

Elastic Email is an Email Service Provider and you can create a free trial account here https://elasticemail./account#/create-account to get access to the email delivery engine and SMTP relay. With a trial, you can send up to 100 emails/day. For more, you have to pay.

That's probably the only option now with smptjs.

本文标签: javascriptHow to solve the smtpjs error with gmail smtp hostStack Overflow