1 Answer
- Newest
- Most votes
- Most comments
1
You could add your template before sending the email using the API call CreateCustomVerificationEmailTemplate
(https://docs.aws.amazon.com/ses/latest/APIReference/API_CreateCustomVerificationEmailTemplate.html), then refer to that template when calling SendCustomVerificationEmail
.
If you are not using the template again, you can delete it after sending the email using DeleteCustomVerificationEmailTemplate
, but make sure the email has been sent and is not being sent asynchronously else you might delete the template before its being used!
answered 2 years ago
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
Ahh perfect! Yeah I didn't think of that. That'll work, I'll just make sure to wait for the callbacks. Cheers.
@Rollerblade7 Does this mean one has to interpolate TemplateData programatically before creating the Template and then send it calling SendCustomVerificationEmail ?
Yes. So when updating the Custom Verification Email Template, it takes the 'TemplateContent' as an entire string, so I just make sure to format the string in code with the data I want in it before I make the request to update the email template. Then when it finishes updating, I then immediately send the verification email using that updated template. To format the TemplateContent string, I make sure to include the {0} symbols within the html string. You essentially have to implement the TemplateData behaviour yourself for custom verification email templates.