I'm integration EmailJs with my mern stack application. Can I pass/change my To email address through code? Currently, it's sending an email to address on which I have made account of EmailJs. I want to send an email to address which I write on runtime.
const variables = {
message_html: 'message',
from_name:'name',
reply_to: "email@gmail.com"
}
window.emailjs.send(
'gmail',
templateId,
variables
).then(res => {
console.log('Email successfully sent!')
})
// Handle errors here however you like, or use a React error boundary
.catch(err => console.error('Oh well, you failed. Here some thoughts on the error that occured:', err))