我正在使用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