cornernote / yii-email-module

Email system with templates and email queuing.
https://cornernote.github.io/yii-email-module/
Other
20 stars 15 forks source link

How to handle large lists #8

Open jecourte opened 10 years ago

jecourte commented 10 years ago

Is there any mechanisms built into the system to trap email that get's bounced back? I have about 145K emails I'm sending in one queue and I get about 5-6K returned. Any thoughts on how you would implement something to record that they get bounced back and then flag a field so they won't get sent to those addresses again?

Also, it's taking a long long time to add all of the emails to the queue. Do you think formulating a huge mysql insert statement into the queue is better than making separate calls to send each email to the queue?

Thanks for a good extension here. I use it frequently!

cornernote commented 10 years ago

Hey @jecourte,

Glad you like the module. I might have time to do some more work on it soon. The admin interface is lacking in some areas (eg, can't delete templates, can't re-spool emails, etc).

To handle bounces I recommend this: http://sourceforge.net/projects/bmh/

I have also added a link to the resources section in the documentation.

To handle large inserts, you should try this:

// instead of:
// $emailSpool->save(false);

// do this:
$emailSpools = array();
$emailSpools[] = $emailSpool->attributes; // get the field/value array
Yii::app()->db->commandBuilder->createMultipleInsertCommand(EmailSpool::model()->tableName(), $emailSpools)->execute();