daniel-zahariev/php-aws-ses

How to use the library to send bulk emails?

DevKishan opened this issue · 7 comments

I need to send bulk emails to multiple recipients using Amazon SES. Also, each email should be personalized according to the recipient's data.
e.g. In the email content and the subject, {{Name}} placeholder tag should be replaced with provided recipient data for each recipient.

Is it possible with this library?

You'll need to send every single personalised email with this library

Thanks for your prompt response. Is there any custom code available that can be added to the library to use it for bulk sending?

The library's main purpose is to send emails and in the latest versions the bulk sending mode is enabled by default. What more do you need?

Currently, I need to send personalized emails in batches

i.e. if there are 5000 emails that have to be sent, then break them into 5 batches each containing 1000 emails.

Prepare some personalization data(name, age, etc) for each email recipient in a batch and then send all emails in the batch along with personalization data of recipients to Amazon SES API in one API request only. This would repeat for each batch then until all batches are processed.

Will that be possible with the library?

You're looking in the wrong place. As far as I know this is not possible with Amazon SES.
With SES you'll have to send the email body (text/html) to the API for every single recipient.
No way to use a template and send parameters for every recipient.