I'm trying to send an email with an href in its body.
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);
Where my Email method is
sendEmail: function (to, from, subject, html) {
check([to, from, subject, text], [String]);
this.unblock();
Email.send({
to: to,
from: from,
subject: subject,
html: html
});
But I'm having no luck. Source of the actual email message does show the anchor tag, but no href inside it.
I've also tried putting the html in a template and then compiling the template using
SRR.compileTemplate
and passing that result as my email body. But that doesn't work either. Any ideas on how to achieve this?