2

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));
Linda Paiste
  • 38,446
  • 6
  • 64
  • 102
AxelFelix
  • 21
  • 4

2 Answers2

1

Have you tried to use app password: https://support.google.com/accounts/answer/185833?hl=en

I myself got it working with app password, might be googles multilevel authentication.

0

Make sure that you are using the password for your SMTP credentials they gave you when you configured it in settings, and not the password for your account. If you don't have the SMTP credentials yet, then inside settings, click "Create SMTP credentials" in order to get the correct password, as well as the correct Host. When you create the SMTP credentials in settings then all of the form information (that goes into the dictionary inside of Email.send()) will be available there.