forwardemail / email-templates

Create, preview (browser/iOS Simulator), and send custom email templates for Node.js. Made for @forwardemail, @ladjs, @cabinjs, @spamscanner, and @breejs.
https://forwardemail.net/docs/send-emails-with-node-js-javascript
MIT License
3.64k stars 339 forks source link

Format Content html #432

Closed robertowiestifsul closed 2 years ago

robertowiestifsul commented 2 years ago

Hi, I am using your package to send emails on my system. However, when I send an email, necessarily to this email I need to add a message, in html format, which is stored in a database. So far the submission works perfectly:

email_admin.send({ template: 'support_admin', message: { from: configMail.from, to: configMail.mail_admin, }, locations: { name: req.user.name, email: req.user.email, message: support.message } })

However, when my recipient receives this message, he receives it with the html content being displayed, for example:

Hi, Hello World


. This "

Hi, Hello World


" content is what is returning from the database and sending it through the message. I need this content to be formatted as the original html formatting. Is it possible to make this modification?

niftylettuce commented 2 years ago

@robertowiestifsul can you please provide a reproducible code example? perhaps you can create a repo on GitHub that reproduces your issue? I need to see more code to be able to help.