我正在使用nodemailer从我的nodejs应用程序发送电子邮件。我成功地能够发送电子邮件。但是,如果我想发送链接,则href或定位标记不起作用。这是链接不作为邮件的一部分。其余的文本被发送。有任何想法吗?Nodemailer - 无法发送可点击链接
下面是相关代码:
var messagebody = "Hello ".concat(req.body.name).concat(", One of your team mates have submitted an application form for intern next summer. Please approve or reject the same on the internship portal. Best Regards.");
var mailOptions = {
from: from, // sender address
to: to, // list of receiver
// cc: cc,
subject: subject, // Subject line
text: messagebody, // plaintext body
html: ' Hello '.concat(req.body.name).concat(' , <br /></br > One of your team mates have submitted an application for intern(s) for next summer. Please approve or reject the proposal on the internship portal. <br /> Here is the link of the internship portal : <a href="https://9.109.124.229:9100/"></a><br /><br /> Best Regards.') // html body
};
我可以发送它,否则,带有换行符的文本(以及我尝试加粗的字符串)会按需要发送。但是,链接不显示。 – Tarun
更改此行Click here – Sagar
雅,将文字“点击这里”标签使其工作。更新你的答案,这样我就可以接受它! – Tarun