Is there a way to send HTML as part of message in templateParams #64
Replies: 1 comment
-
You can add HTML code using triple curly braces, but I don't recommend doing this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Below is my code to send email:
const templateParams = { to_email: toEmail, to_name: toName, from_name: fromName, reply_to: replyTo, message, } emailjs .send( EMAILJS_SERVICE_ID, EMAILJS_TEMPLATE_ID, templateParams, EMAILJS_USER_ID, ) .then( (response) => { console.log('SUCCESS!', response.status, response.text) return true }, (error) => { console.log('FAILED...', error) throw error }, )
The message attribute is mainly the body of the email. When I add HTML tags in my 'message' attribute it doesnot render the tags in the email, the tags show up as text e.g. . Is there a way to make the message render the HTML tag as well?
Beta Was this translation helpful? Give feedback.
All reactions