Re: Re: PHP and email
| From: | Anas Mughal | Date: | Wed, 23 Nov 2005 21:38:34 +0000 |
| Subject: | Re: Re: PHP and email | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-226385@lists.php.net to get a copy of this message | ||
I have implemeted a system that dispatches between 600 to 2000 emails every
night. An email is sent for each recepient. My system is hosted on a shared
Linus server. I have not heard any complaints from the hosting company so
far.
Here are my recommendations:
- Have a cron job that kicks off your PHP script at intervals long enough to
guarantee the completion of an earlier execution of the script.
- Have a sleep interval between a predefined number of emails sent. You need
to figure out what works well for you depending on your dispatch frequency,
etc. (I would keep the sleep interval short.)
- No need to nice anything. The problem is the load on the smtp server. You
need to give it some time to process what you sent already before sending
more emails.
- Log all outbound activity. We log the email addresses of who receives each
message. That provides auditing and helps in recovering any failures.
- We use flags in our database to flag what messages were sent successfully..
That way, we can search and resend any failed messages.
Hope this helps.
--
Anas Mughal