Javascript 无法自定义AWS SES电子邮件模板
我正试图通过AWS SES服务发送忘记密码邮件。我制作了这个模板Javascript 无法自定义AWS SES电子邮件模板,javascript,node.js,amazon-web-services,express,amazon-ses,Javascript,Node.js,Amazon Web Services,Express,Amazon Ses,我正试图通过AWS SES服务发送忘记密码邮件。我制作了这个模板 { "Template":{ "TemplateName": "forgotpasswrd", "SubjectPart": "Forgot password ", "TextPart":"Text area", &quo
{
"Template":{
"TemplateName": "forgotpasswrd",
"SubjectPart": "Forgot password ",
"TextPart":"Text area",
"HtmlPart":"<p>We heard that you lost your password. Sorry about that!<\/p>\r\n <p>But don\u2019t worry! You can use the following link to reset your password:<\/p>\r\n <a href=${url}>${url}<\/a>\r\n <p>If you don\u2019t use this link within 1 hour, it will expire.<\/p>\r\n "
}
}
在这个Url中
是我试图发送的内容
但是,当我收到邮件时,它不显示链接,只显示html文本
“但别担心!您可以使用以下链接重置密码:
${url}
如果您在1小时内未使用此链接,它将过期。“
如何在邮件中发送链接?它应该是
{{url}
,而不是${url}
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);