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 and Plain text #23

Closed
nicwells opened this issue Oct 16, 2017 · 3 comments
Closed

HTML and Plain text #23

nicwells opened this issue Oct 16, 2017 · 3 comments

Comments

@nicwells
Copy link

Is there a way to provide both an HTML and a plain text template? Thanks!

@wellseee
Copy link

I can see how you can do this now. You need to specify as MIME formatted message in the template by specifying a MIME field and following the standard email message format(s). Something along these lines in case anyone else is wanting to do similar.

TO: {{email}}
SUBJECT: Testing mailmerge
FROM: My Self myself@mydomain.com
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="outer-boundary"

This is a MIME-encoded message. If you are seeing this, your mail
reader is old.
--outer-boundary
Content-Type: text/plain; charset=us-ascii

This message might make you :) or it might make you :(

--outer-boundary
MIME-Version: 1.0
Content-Type: multipart/related;
type="text/html"; start="body@here"; boundary="inner-boundary"

--inner-boundary
Content-Type: text/html; charset=us-ascii
Content-Disposition: inline
Content-ID: body@here

This message might make you Shout or it might make youScream

--outer-boundary--

@awdeorio
Copy link
Owner

awdeorio commented Nov 1, 2017

Thanks for the example! I'll add this to the README.

@nicwells
Copy link
Author

nicwells commented Nov 2, 2017

@awdeorio no problem. Thanks so much for making this tool, it's great. I was just about to look into implementing utf/character encoding support but looks like you may have just done that so that is fantastic!

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

3 participants