send email using javascript and mailtrap
function sendEmail() {
Email.send({
Host : "smtp.mailtrap.io",
Username : "<Mailtrap username>",
Password : "<Mailtrap 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)
);
}