I'm using node.js mailer module to send email from node server. I used template file for that but I got all spaces trimmed when the message was sent. I tried to add '\n' at the end line of the template but it doesn't work also. Here is an example of template file:
Hi {{username}},\\n
Thanks for creating an account with us
I tried \n and \n , nothing all doesn't work. Any help?
Thanks,
nodemailer supports two types of templates, i.e. text and html (or templateFn() - case of loopback).
The option text is used for email clients which don't support HTML rendering so that \n should be used in this option for a new line.
On the contrary, you should swap \n with <br> in the option html.
Hope this would help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With