<!DOCTYPE html>
<html>
<head>
<title>Send Mail</title>
<script src=
"https://smtpjs.com/v3/smtp.js">
</script>
<script type="text/javascript">
function sendEmail() {
Email.send({
Host: "smtp.elasticemail.com",
Username: "phamngoctuong1805@gmail.com",
Password: "6D2D08358926B924921F9A544DC4934BE9EC",
To: 'phamkyanh8668@gmail.com',
From: "phamngoctuong1805@gmail.com",
Subject: "Sending Email using javascript",
Body: "Well that was easy 1!!",
})
.then(function (message) {
console.log(message);
});
}
</script>
</head>
<body>
<form method="post">
<input type="button" value="Send Email"
onclick="sendEmail()" />
</form>
</body>
</html>