PHP mail function
View Single Post
12-06-2011, 06:18 PM
Join Date: Nov 2007
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.
View Public Profile
Send a private message to wGEric
Visit wGEric's homepage!
Find More Posts by wGEric