Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nodemailer - Unable to send clickable link

I am using nodemailer for sending emails from my nodejs app. I am successfully able to send an email. But, if I want to send a link, the href or anchor tag is not working. That is the link does not go as part of the mail. The rest of the text is sent. Any ideas?

Here is the relevant code :

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
        };
like image 662
Dreams Avatar asked Nov 30 '25 16:11

Dreams


1 Answers

Your code is Correct but you havn't wrote anything in between <a></a> tags. Just put some text between them and it will work.

<a href="https://9.109.124.229:9100/"> Click here </a>
like image 130
Sagar Avatar answered Dec 02 '25 06:12

Sagar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!