How to add unsubscribe url to email?

0

Hello!
I have read documentation about unsubscribe https://docs.aws.amazon.com/ses/latest/dg/sending-email-subscription-management.html
Domain verified.
But I don't understand, how to add unsubscribe url to email' template.
When I add {{amazonSESUnsubscribeUrl}} to template, I got "rendering failure" error.

aws ses send-templated-email --cli-input-json file://email.json
aws ses send-bulk-templated-email --cli-input-json file://emails.json

Please, help me!

Tatiana
asked 3 years ago2644 views
2 Answers
0

I used sesev2 instead of ses and it works.
Here is another JSON file format like this: https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendEmail.html
aws sesv2 send-email --cli-input-json file://email.json

Tatiana
answered 3 years ago
0

You can also add it to the payload if you're using the APIs:

"Body": { "Html": { "Charset": "UTF-8", "Data": "<html><body>{{ses:openTracker}} HTML BODY {{amazonSESUnsubscribeUrl}}</body></html>" }

AWS
bruno_g
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions