|
Posted by Matthew Weier O'Phinney on 10/09/88 11:26
* "Ryan A" <Ryan@Coinpass.com>:
> My client has a dating site and now he wants to mail all his members,
> he does not want to use any of the already installed mailing lists but
> wants us to make one for him, he's on a dedicated server.
>
> Presently he does not have too many members, just a few thousand
> (around 3k i guess), I remember reading sometime back on the list that
> using the mail() may not be the best option...not sure if thats still
> true.
>
> The thing that bothers me the most is if the program times out..., how
> do I start again from the ones that have not been sent?
>
> eg:
> (10 members)
> mail gets sent to first 4 members then times out
> we re-click on the send button and it starts again from one...again
> times out (this happens 5 times)
>
> that means members 1-4 will get the same email 5 times
>
> Doing this the hard way would be to connect to the db after each
> successful mail and "mark" each member with todays date or
> something...but I would like to avoid so many calls to the DB if
> possible...esp if the site grows.
>
> Ideas/suggestions?
Build a queueing system, and use cron to actually process and mail the
list.
Longer explanation:
I run a mass-mailer for a non-profit, and the way our works is to store
all mail information in a database. We then have a cronjob that runs
each minute and checks to see if any mailings need to be sent (basically,
the absense of a 'sent' flag), and then processes the mailing.
Mails are then queued to an MTA -- in our case, Postfix. This allows us
to handle bounces (another script is triggered when email bounces back
to the reply-to address).
So, on your web-based front-end, when you click 'Send', it actually
simply places the information in a database queue, and the cronjob does
the actual sending.
--
Matthew Weier O'Phinney
Zend Certified Engineer
http://weierophinney.net/matthew/
[Back to original message]
|