2017-07-27 91 views
0

我特林發送該郵件的工作,但我想重定向URL發送到郵件正文重定向URL nodemailer

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 
     }; 

但由於「:」和//這是我得到錯誤。

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

回答

1

該URL是字符串的一部分,您的語法無效。

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

哦,謝謝你,這是一個愚蠢的錯誤。 –