Re: [PHP] Mail(): Does it block question?
On UNIX PHP hands the message off to sendmail to be delivered. You want this stuff to happen out of band, it makes no sense to sit there and watch a browser spin while something is off communicating with an smtp server. So, depending on your sendmail configuration, and how you are invoking sendmail (see your php.ini file) it will be non-blocking if you tell sendmail to simply queue it. For high-volume mail delivery, you should be using a dedicated mailing list system. Have PHP send a single message to the list and let the list system do the mass-delivery for you. Right tool for the job and all... -Rasmus On Tue, 13 Aug 2002, Jean-Christian Imbeault wrote: Is the mail() function blocking or non-blocking? Does anyone know how I can make it non-blocking? I don't want to have my script waiting on mail() to return ... Also I read that mail() should not be used for large volumes of mail. How large is large? Can mail() handle a couple of messages per second? If not what other alternatives are there for sending mail using PHP? Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail(): Does it block question?
Rasmus Lerdorf wrote: So, depending on your sendmail configuration, and how you are invoking sendmail (see your php.ini file) it will be non-blocking if you tell sendmail to simply queue it. Ok. I'll look into what settings are important in php.ini For high-volume mail delivery, you should be using a dedicated mailing list system. Have PHP send a single message to the list and let the list system do the mass-delivery for you. Right tool for the job and all... Totally agree. But just what is high-volume is my question ... I guess I need to do some testing to find this out perhaps ... Would you have any recommendations on a simple mailing list system that integrates well with PHP? I'm building a password protected site and want to email users their passwords and also allow people to have their passwords mailed to them. There would be about 10,000 users so I figure the demand for passwords would be at most one per second during peak time. Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail(): Does it block question?
Just about any mailing list system that supports subscriber passwords should do. I can't imagine a way they would store these passwords that PHP wouldn't be able to grok with a little 10-minute hack job. -Rasmus On Tue, 13 Aug 2002, Jean-Christian Imbeault wrote: Rasmus Lerdorf wrote: So, depending on your sendmail configuration, and how you are invoking sendmail (see your php.ini file) it will be non-blocking if you tell sendmail to simply queue it. Ok. I'll look into what settings are important in php.ini For high-volume mail delivery, you should be using a dedicated mailing list system. Have PHP send a single message to the list and let the list system do the mass-delivery for you. Right tool for the job and all... Totally agree. But just what is high-volume is my question ... I guess I need to do some testing to find this out perhaps ... Would you have any recommendations on a simple mailing list system that integrates well with PHP? I'm building a password protected site and want to email users their passwords and also allow people to have their passwords mailed to them. There would be about 10,000 users so I figure the demand for passwords would be at most one per second during peak time. Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mail(): Does it block question?
Hello, On 08/13/2002 01:44 AM, Jean-Christian Imbeault wrote: For high-volume mail delivery, you should be using a dedicated mailing list system. Have PHP send a single message to the list and let the list system do the mass-delivery for you. Right tool for the job and all... Totally agree. But just what is high-volume is my question ... I guess I need to do some testing to find this out perhaps ... Would you have any recommendations on a simple mailing list system that integrates well with PHP? I'm building a password protected site and want to email users their passwords and also allow people to have their passwords mailed to them. There would be about 10,000 users so I figure the demand for passwords would be at most one per second during peak time. If you really want something taylored to you needs, you'd better invest on something written by yourself. Most ready to mailing list systems do not integrate well with custom applications because they usually have only a limited set of functions that you need. You can do it all in PHP. Only the actual message delivery is better to rely in your local mailer because that is one particular thing that it is optimized for. All you need to do is to send the messages putting all recipients in Bcc:. If you use sendmail, or better like qmail, the actual queue time can be of just a few seconds per message to be delivered to tens of thousands of users. What takes a little time is subscriber list extraction. SQL based databases are not the best option for this purpose, but if your volume of list messages is low, that should not be a problem. For lists of higher volume of messages, you need to use something more efficient. Some dedicated mailing list managers like ezmlm use DBM like databases to store subscriber information. These are much faster to query than SQL databases. If your rate of subscriptions/unsubscriptions is higher than the new message rate, you can just hold subscriber list caches in simple text files so you avoid lengthy database queries. When a user subscribes or unsubscribes, you just update the cache or at least flags it somehow that next message that is sent, the cache needs to be updated. Smart software often beats fast software. All this can be written in PHP hands down as long as you write it smartly. :-) -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php