I was trying to do a contact me page using https://smtpjs.com/v3/smtp.js
with elasticmail
. I want to pass my token from a PHP file, to make it private.
Email.send({
SecureToken : "some secret token from php",
To : 'tosomeone@example.com',
From : 'fromsomeone@example.com',
Subject : projectValue + " - " + emailValue,
Body : 'Some body'
}).then(
message => alert("Message sent successfully")
);
As you can see, if I pass the token here it is visible to anyone and everyone can use this to send emails. So how do I pass it from PHP? If you provide step-by-step, it will be very helpful. Thanks