<!DOCTYPE html> <html> <head> <title>Sending Mail</title> <script src="https://smtpjs.com/v3/smtp.js"></script> <script type="text/javascript"> function sendEmail() { Email.send({ Host: "smtp.gmail.com", Username: "xxxxxxx@gmail.com", Password: "xxxxxxxx", To: 'yyyyyyyyy@gmail.com', From: "xxxxxxx@gmail.com", Subject: "Sending Email using javascript", Body: "Well that was easy!!", }) .then(function (message) { alert("Mail has been sent successfully") }); } </script> </head> <body> <form method="post"> <input type="button" value="Send Mail" onclick="sendEmail()" /> </form> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)