[Catalyst] Email group of people

Steve Atkins steve at blighty.com
Wed Apr 5 00:43:53 CEST 2006

On Apr 4, 2006, at 3:34 PM, Bill Moseley wrote:

> I'm using the Email plugin for sending single mails, and I do it
> within my controller during the request.
> I now have a need to send about 50 individual messages as a result of
> a form post.
> What's would you suggest?
> - Write the mail and list of recipients to the database and then let
> cron process them later?

Works well operationally. It handles "my smarthost
went away" and allows easy monitoring of queue size. Doesn't
scale to high volumes well, but I doubt it'll be a problem here.
Requires some annoying infrastructure, which is useful to have
if you'll use it for other stuff, but too much like hard work for a  

> - Get all I need out of the database and then fork and send the mail?

That'll be painful and likely break a lot of things.

> - Just do $c->email in a loop and use some kind of please wait
> screen?

Have you timed how long $c->email takes? I'd hope that it would
take less than a couple of seconds to send 50 emails to a local
smarthost. You might not need to have a "please wait" screen.

I'd go for D). Dump 50 mails out to the local smarthost in your
controller, and let the smarthost do the queuing and trickle the
mail out to the network if needed.


More information about the Catalyst mailing list