Error when using smtpJs to send email (JavaScript)

Viewed 998

I'm having an error when I try to send an email with smtpJS:

"The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Authentication Required. Learn more at (dont appear any link)."

I had a notification of security on my email, but nothing was send, i've already enable the "less security apps" on my gmail, but nothing happen again, so, i dont know how to do it.

PS: I've already try to use nodemailer, but nope 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));
1 Answers
Related