sachin yadav sachin yadav - 1 year ago 107
Node.js Question

Send redirect URL in the text body of mail using nodemailer

I am tring to send mail which is working but i want to send redirect url into the mail text

var mailOptions = {
from: '[email protected]',
to: user_info.email,
subject: 'Sign up confirmation.',
text: 'Go to this link for confirmation of your registration'+ http://localhost:8000/user/registration/confirmation?id=id
};


but due to ':' and // this the i am getting error.

text: 'Go to this link for confirmation of your registration'+ localhost:8000/user/registration/confirmation?id=id

Answer Source

The URL is part of the string, your syntax is invalid.

text: 'Go to this link for confirmation of your registration http://localhost:8000/user/registration/confirmation?id=id'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download