<script src="https://smtpjs.com/v3/smtp.js">
</script>
<script>
var n=0;
</script>
<button type="button" onclick="Email.send({
Host : 'smtp.gmail.com',
Username : '[[email protected]]',
Password : '[app specifc password]',
To : '[[email protected]]',
From : '[[email protected]]',
Subject : 'Subject' ,
Body : n
}){
.then(
message => alert(message)
);
}">
test
</button>
Pretty much what the question says. I have tested this and if I put 'Body' in after "Body:" then it will send the email. What I want it to do is send the value of the variable. I am fairly new to JavaScript so simple explanations would be best.
I am using this code from this webpage :https://www.smtpjs.com/