Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html versus plain #10

Open
bluenike opened this issue Jan 11, 2017 · 4 comments
Open

html versus plain #10

bluenike opened this issue Jan 11, 2017 · 4 comments

Comments

@bluenike
Copy link

Is it possible to specify a template for the plaintext version of the email (in addition to the html version)?

@yads
Copy link
Owner

yads commented Jan 30, 2017

You would have to create 2 separate tansporters, one for plain text and one for html.

@bluenike
Copy link
Author

Will that allow you to create a multipart message that encapsulates text and html versions of the email in single message?

@patchlog
Copy link
Contributor

patchlog commented Jan 29, 2018

I fixed this and created a pull request (#13 ). After applying my patch just define the "text_template" and nodemailer will create a multipart/alternative message.

@knoxcard
Copy link

knoxcard commented Feb 1, 2018

Currently employing a quick hack solution on a production server, somewhere along the lines listed below:

var template_name = 'create_account'
var template_html = require('fs').readFileSync(require('path').join(__dirname, '../templates/emails/' + template_name + '.hbs'), 'utf8')
var template_text = require('striptags')(template_html )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants