我正在尝试发送一封带有href内容的电子邮件。
const link= document.createElement("a");
link.href = window.location.href;
emailDetails.body = "Here is an href: \r\n" + link;
Meteor.call("sendEmail",emailDetails.to,email,emailDetails.subject,emailDetails.body);
我的电子邮件方法是
sendEmail: function (to,from,subject,html) {
check([to,text],[String]);
this.unblock();
Email.send({
to: to,from: from,subject: subject,html: html
});
但是我没有运气。实际电子邮件的来源确实显示了锚标记,但内部没有href。
我也尝试将html放入模板中,然后使用
编译模板SRR.compileTemplate
,并将结果作为我的电子邮件正文传递。但这也不起作用。关于如何实现这一目标的任何想法?