3

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: "[email protected]",
  From: "[email protected]",
  Subject: "Test email",
  Body:
    "<html><h2>Header</h2><strong>Bold text</strong><br></br><em>Italic</em></html>",
}).then((message) => alert(message));

2 Answers 2

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.

Sign up to request clarification or add additional context in comments.

Comments

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.