Sarkis Arutiunian
Sarkis Arutiunian

Reputation: 1291

meteor how to send HTML body in email?

I am using meteor email package and everything work great besides one problem:

Meteor.call('sendEmail',
  '[email protected]',
  '[email protected]',
  'some text' + thisGame.gameNumber,
  '<div> some HTML body' + some.prop + '</div>'
);

Yes, it works, but what if I have really big mail body I have to write it inline? How can I keep mail body (with some property) in different file and how do I have include it in call function?

Upvotes: 0

Views: 124

Answers (1)

Michel Floyd
Michel Floyd

Reputation: 20256

Simply use the ssr (server-side rendering) package to render HTML server side (including variable substitution obviously) and embed it an email.

Upvotes: 1

Related Questions