[英]meteor how to send HTML body in email?
I am using meteor
email package and everything work great besides one problem: 我正在使用meteor
电子邮件程序包,除一个问题外,其他所有功能都很好:
Meteor.call('sendEmail', 'mail@gmail.com', 'postmaster@mailgun.org', '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? 如何将邮件正文(具有某些属性)保存在其他文件中,如何在调用函数中包含它?
只需使用ssr (服务器端渲染)包来渲染HTML服务器端(显然包括变量替换)并将其嵌入电子邮件中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.