I am trying to send an email through my node JS application, and I have this script in one of my pages.
<script src="https://smtpjs.com/v3/smtp.js"></script>
<script>
function sendEmail(){console.log(Email)
Email.send({
SecureToken:'#########',
To: `mymail@gmail.com`,
From: "info@example.com",
Subject: "Hello world",
Body: `Lorem ipsum dolor sit amet`
}).then(response => {
alert(response)
});
}
</script>
<button onclick="sendEmail()">Send email</button>
I get as response OK, but no email is being sent. Any idea what am I missing?