0

When I submit the button, the mail sent successfully popup was shown but I have not received any mail in the inbox.

HTML:

<form method="post">
 <input type="button" value="Send Email" onclick="sendEmail()"/>
</form>

Script:

<script src="https://smtpjs.com/v3/smtp.js"></script>
function sendEmail() {
 event.preventDefault();
Email.send({
SecureToken :"xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx",
Host: "smtp.gmail.com",
SSL : "Enable",
Username : "xxx@gmail.com",
Password : "xxxxxxxx",
To : 'xxxxx@gmail.com',
From : "xxx@gmail.com",
Subject : "<email subject>",
Body : "<email body>",
}).then(
    message => alert("mail sent successfully")
);
}

I got an error like

"Failure sending mail." in-network response

Note: I added two-step verification for my Gmail account and turn on my access

vishnupriya
  • 37
  • 1
  • 6

0 Answers0