I would like to know if there is a way to substitute/replace values in the body of a message. Let’s say I have something like this:
Hello %user_first %user_last, thanks for checking out our site. Blah, blah, blah...
unsubscribe
<a href='mysite.com/unsubscribe?uid=%unsibscribe_id&token=%some_token'>
HERE
</a>
<img src='mysite.com/images/user-opened-email.gif?sid=%some_id'>
where %user_first, %user_last, %unsibscribe_id, %some_token, and %some_id are user specific values and cannot be the same from one email to the other.
Ideally this would happen in just one API call rather than doing a srt_replace and calling the API multiple times.
Help is appreciated.
There is nothing like that built into the Amazon SES service.
In PHP, this would be pretty easy to do with some basic templating.
As for this:
I’m not quite sure what you mean. Each call to the
SendEmailoperation sends a single email, so you’d need to make one API call per email anyway.Were you expecting something different?