[clue-tech] Improving performance of php sending mail via exim on CentOS5

Dan Harris dan at drivefaster.net
Thu Mar 4 20:55:09 MST 2010


On 3/3/10 4:56 PM, Greg Knaddison wrote:
> Hello Cluebies,
>
> I've got a problem that spans PHP, Exim, and maybe Linux just enough
> that this is the best place for figuring it out. It's a discussion
> site sending e-mail notifications to users. It needs to generate
> custom messages for each user so it is calling php's mail() function
> once per recipient. There are 7,000 people who get notified with each
> new post to the site.
>    
Are you calling mail() 7,000 times?  If so, can you instead add all the 
recipients as bcc and call mail() once?  It seems that you're incurring 
a lot more overhead in the php process.  Letting Exim handle the mass 
distribution should be a lot more resource-efficient.

-Dan


More information about the clue-tech mailing list