I am trying to send emails from my client-side javascript however the function does not send the email. I do not know what I am doing wrong yet or is the feature disabled from Gmail? Here is my code
function sendEmail() {
Email.send({
Host: "smtp.gmail.com",
Username: "myemail@gmail.com",
Password: "password",
To: "recepientemail",
From: "myemail@gmail.com",
Subject: "Subject",
Body: "Hooray",
})
.then(function (message) {
console.log("mail sent successfully")
});
}