Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 138221

Meteor href in email

$
0
0

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?


Viewing all articles
Browse latest Browse all 138221

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>