This is a discussion on Mailing List within the PHP General forums, part of the PHP Programming Forums category; Dear All, I would like to setup a mailing list for my company. I have a database containing email address ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Dear All,
I would like to setup a mailing list for my company. I have a database containing email address of my clients along with other details. How can I send them mails ? If i write a script containing the mail function and loop the address, I think that might generate a script timeout error. I feel increasing the script timeout is not a good solution. I would like to know how you manage such situations. I feel this is a common problem but i didnt find any solution on the net. Do I need to use any sw or are there any already available scripts. Thanks a Lot !! Long Live PHP !! Thanks & Regards, ___________________________ PHPLover "Göd döësn't pläy dícë." - Älbërt Ëínstëín |
|
|||
|
Allowing scripts to run without some kind of time limit may not be prudent,
but settling for the timelimit imposed on online web pages is not reasonable either. I would recommend you reset the time limit to something reasonable to perform your email tasks on the computer you have available. http://www.php.net/manual/en/functio...time-limit.php As long as you don't have a "run away" program, I can't think of any reason not to allow it to have the time it needs to get the job done. Warren Vail warren@vailtech.net -----Original Message----- From: PHPLover [mailto:phplover@hotmail.com] Sent: Sunday, November 02, 2003 10:18 PM To: php-general@lists.php.net Subject: [php] Mailing List Dear All, I would like to setup a mailing list for my company. I have a database containing email address of my clients along with other details. How can I send them mails ? If i write a script containing the mail function and loop the address, I think that might generate a script timeout error. I feel increasing the script timeout is not a good solution. I would like to know how you manage such situations. I feel this is a common problem but i didnt find any solution on the net. Do I need to use any sw or are there any already available scripts. Thanks a Lot !! Long Live PHP !! Thanks & Regards, ___________________________ PHPLover "Göd döësn't pläy dícë." - Älbërt Ëínstëín |
|
|||
|
> I would like to setup a mailing list for my company.
> I have a database containing email address of my clients along with other > details. > How can I send them mails ? > If i write a script containing the mail function and loop the address, I > think that might generate a script timeout error. I feel increasing the > script timeout is not a good solution. I would like to know how you manage > such situations. I feel this is a common problem but i didnt find any > solution on the net. Do I need to use any sw or are there any already > available scripts. I built a queuing system to email to a large list. The general approach is to add a database table that stores the email message and tracks progress through the list. A PHP script called by a crontab checks the database to see if a mailing is in progress. If so, it selects a certain number of addresses and sends the message. By controlling the number of addresses selected and how often the crontab calls the script, the email rate is controlled. And using a crontab makes it a background process. The email message is created and list progress monitored through a content management system. -- Lowell Allen |
|
|||
|
PHPLover --
...and then PHPLover said... % % Dear All, % % I would like to setup a mailing list for my company. Then set up a mailing list. % I have a database containing email address of my clients along with other % details. That's good. % How can I send them mails ? I would highly recommend ezmlm for mailing list software. It does a fantastic job. Now if you actually mean to send customized letters you'll have to inject each one singly, which really gets time-consuming. In either case, I would avoid having php do your actual mailing; use the web interface for selecting recipients, creating your message body, and whatnot, but then hand off the actual mailing work to a separate process (and don't expect to wait until it finishes). % If i write a script containing the mail function and loop the address, I % think that might generate a script timeout error. I feel increasing the % script timeout is not a good solution. I would like to know how you manage We run a fan / marketing site for various clients (bands, video game companies, whatnot) which offer content for those interested, a vanity email address, and regular newsletters offsite to the "base" addresses. Through moderate but not insane tuning I've managed to get our mail processing down to about 120ms per message; that gives me in excess of 25k messages queued per hour, which is near our target of 60k emails within two hours (and of course some of those take longer because of timeouts and retries and such). Even so, there's obviously no way that a web browser would wait around for that kind of delay. We follow a model similar to that of another poster; our subscribers are in a database along with the massmail info and a cron job checks for queued jobs and processes them. It would be a lot easier if we could send out a general letter, but fans like it when you address them by name and so on :-/ % such situations. I feel this is a common problem but i didnt find any % solution on the net. Do I need to use any sw or are there any already % available scripts. I agree that it's a common problem. The reason you didn't find your answers was because you looked for the wrong ones :-) % % Thanks a Lot !! % Long Live PHP !! % % Thanks & Regards, % ___________________________ % PHPLover % "Göd döësn't pläy dícë." % - Älbërt Ëínstëín Is there something wrong with your vowels? HTH & HAND :-D -- David T-G * There is too much animal courage in (play) davidtg@justpickone.org * society and not sufficient moral courage. (work) davidtgwork@justpickone.org -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE/pm5ZGb7uCXufRwARAmnaAKC0k3VgxkWQNYtMHWtTkfgs6X+BEw CfXgaT qKZxCKJLDXkGePPmAbUz3J4= =YSFu -----END PGP SIGNATURE----- |