【发布时间】:2020-03-09 19:54:19
【问题描述】:
我正在尝试发送一封正文中带有 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, from, subject, text], [String]);
this.unblock();
Email.send({
to: to,
from: from,
subject: subject,
html: html
});
但我没有运气。实际电子邮件消息的来源确实显示了锚标记,但其中没有 href。
我也尝试将 html 放入模板中,然后使用
编译模板SRR.compileTemplate
并将结果作为我的电子邮件正文传递。但这也行不通。关于如何实现这一点的任何想法?
【问题讨论】:
标签: javascript html node.js email meteor