I am trying to send a forgot password mail through AWS SES service. I made this template
{ "Template":{ "TemplateName": "forgotpasswrd", "SubjectPart": "Forgot password ", "TextPart":"Text area", "HtmlPart":"<p>We heard that you lost your password. Sorry about that!</p>rn <p>But donu2019t worry! You can use the following link to reset your password:</p>rn <a href=${url}>${url}</a>rn <p>If you donu2019t use this link within 1 hour, it will expire.</p>rn " } }
And this is my code in nodejs to input password reset link.
const params = {}; const destination = { ToAddresses: [String(email)], }; const templateData = {}; templateData.url = String(Url); params.Source = 'myemailid@gmail.com'; params.Destination = destination; params.Template = 'forgotpassword'; params.TemplateData = JSON.stringify(templateData);
In this Url
is what i am trying to send.
However when I receive the mail its it does not show the link but only the html text
” But don’t worry! You can use the following link to reset your password:
${url} If you don’t use this link within 1 hour, it will expire.”
How do I send the link in the mail?
Advertisement
Answer
It should be {{url}}
, not ${url}
. See the documentation.