View Single Post
Old 12-06-2011, 06:18 PM   #17 (permalink)
wGEric
The Acquainted
 
wGEric's Avatar
 
Join Date: Nov 2007
Posts: 166
Thanks: 0
wGEric is on a distinguished road
Default

What you need to do is make it so that PHP isn't waiting for a response if the emails have been sent. You won't be able to optimize the PHP to get a faster response since the bottle neck is the SMTP server.

You could have PHP execute scripts on the server that would send the emails and not block the PHP.

You could do a cron job. Not ideal since it won't be sending the emails right away. They will be delayed.

You could use AJAX and send 60 requests to a PHP file that would then send the emails asynchronously (you probably wouldn't want to send 60 requests at the same time). Each email being sent would then have its own process. But this could tie up apache processes and affect people on your site. This might be your only option since you said you are on a shared host.
__________________
Eric
wGEric is offline  
Reply With Quote