I'm trying to send approx 50K messages a day using swift mailer and it's working well but I need to improve performance and reliability a little. At present, I am calling a php script every minute using cron which essentially does the following pseudo-code
Code: Select all
Fetch email template
Construct message
Fetch x addresses from the database
add each address to recipient list
failedaddresses = $swift->batchSend
For each address
if in failedaddress set message failed else set message sent
My question is, would there be much of a performance hit in sending the emails one at a time and updating the db for each address. Is there an optimum way to do this so I don't have to create a new message object each time or whatever?
Thanks