Currently, I am working on implementing a stylish email template for when a user registers with their email. To achieve this, I am utilizing Express and Node Mailer. Initially, my code appeared as follows:
"Hello, " +
user.username +
",\n\n" +
"Please complete your registration by clicking the link:
\nhttp://" + req.headers.host + "/confirmation/" + user.username + "/" + token.token +
"\n\nThank you!\n""
In an attempt to incorporate this into my HTML template using a template literal, I have tried the following:
const output = `<a href="${req.headers.host} + "/confirmation/" + ${user.username} + "/" + ${token.token}" `
Unfortunately, this approach did not work as expected. The <a>
tag in the email template does not contain an href
. It seems like I might be overlooking something fundamental... any assistance would be greatly appreciated! =)