Reputation: 6349
I would like to know how Email
package chooses to send html
or text
version of an email.
The doc for Email.send
says:
Email.send(options)
...
options
...
text, html (String)
Mail body (in plain text and/or HTML)
So it seems that we can supply both text
and html
. Any information?
Upvotes: 0
Views: 106
Reputation: 16478
Under the hood, Meteor's Email package uses mailcomposer for mail composition.
If the options
object includes both html
and text
, both of them will be sent in a multipart/alternative
content-type email massage and the email client will be able to choose which one to display (the HTML, for any modern client).
You can easily test this by sending some emails with text/html/both and look at their source.
Upvotes: 2