[PHP] Re: php mail() scaleability

2004-04-25 Thread Manuel Lemos
Hello,

On 04/25/2004 04:18 PM, Josh Klobe wrote:
Using  mail($to, $subject, $content, $headers) takes way too long when
attempting to mail to 30k people.  This seems to be a result of a socket
being opened for each send.  Is there a better way to approach this
situation via php?
Under Unix/Linux, PHP itself does not open any sockets to queue messages 
with the mail function. If you are using Unix/Linux with sendmail there 
are some options that can be tweaked to make it just queue the message 
instead of trying to deliver the message immediately.

--

Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: php mail() scaleability

2004-04-25 Thread Travis Low
Manuel Lemos wrote:
Hello,

On 04/25/2004 04:18 PM, Josh Klobe wrote:

Using  mail($to, $subject, $content, $headers) takes way too long when
attempting to mail to 30k people.  This seems to be a result of a socket
being opened for each send.  Is there a better way to approach this
situation via php?
Under Unix/Linux, PHP itself does not open any sockets to queue messages 
with the mail function. If you are using Unix/Linux with sendmail there 
are some options that can be tweaked to make it just queue the message 
instead of trying to deliver the message immediately.
Okay, I'll bite.  What options?

cheers,

Travis

--
Travis Low
mailto:[EMAIL PROTECTED]
http://www.dawnstar.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: php mail() scaleability

2004-04-25 Thread Manuel Lemos
Hello,

On 04/25/2004 05:43 PM, Travis Low wrote:
Using  mail($to, $subject, $content, $headers) takes way too long when
attempting to mail to 30k people.  This seems to be a result of a socket
being opened for each send.  Is there a better way to approach this
situation via php?


Under Unix/Linux, PHP itself does not open any sockets to queue 
messages with the mail function. If you are using Unix/Linux with 
sendmail there are some options that can be tweaked to make it just 
queue the message instead of trying to deliver the message immediately.


Okay, I'll bite.  What options?
There are several options that may suite you. Check sendmail man page 
for DeliveryMode option.

You may also want to take a look at this class that comes with a 
sub-class specialized in deliverying messages with sendmail. It provide 
a delivery_mode class variable that lets you override the sendmail 
default delivery mode.

If you want to try this class but do not want to change your scripts 
much, you can also use a wrapper function that comes with this class 
named sendmail_mail(). It emulates the mail() function except that you 
can change these options. You just need to include the class files and 
change the mail() calls to sendmail_mail() calls without any need to 
change parameters.

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Re: php mail() scaleability

2004-04-25 Thread Jason Sheets
Take a look at the Mail Queue class from PEAR, it enables you to put mail in
the Queue instead of real time delivery.

http://pear.php.net/packages.php?catpid=14catname=Mail

Jason 

-Original Message-
From: Travis Low [mailto:[EMAIL PROTECTED] 
Sent: Sunday, April 25, 2004 2:43 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: php mail() scaleability

Manuel Lemos wrote:
 Hello,
 
 On 04/25/2004 04:18 PM, Josh Klobe wrote:
 
 Using  mail($to, $subject, $content, $headers) takes way too long 
 when attempting to mail to 30k people.  This seems to be a result of 
 a socket being opened for each send.  Is there a better way to 
 approach this situation via php?
 
 Under Unix/Linux, PHP itself does not open any sockets to queue 
 messages with the mail function. If you are using Unix/Linux with 
 sendmail there are some options that can be tweaked to make it just 
 queue the message instead of trying to deliver the message immediately.

Okay, I'll bite.  What options?

cheers,

Travis


--
Travis Low
mailto:[EMAIL PROTECTED]
http://www.dawnstar.com

--
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] Re: php mail() scaleability

2004-04-25 Thread Manuel Lemos
Hello,

On 04/25/2004 06:03 PM, Jason Sheets wrote:
Take a look at the Mail Queue class from PEAR, it enables you to put mail in
the Queue instead of real time delivery.
http://pear.php.net/packages.php?catpid=14catname=Mail
This is a bit of an overkill as it attempts to provide an inefficient 
solution replicate the dedicated solution built-in sendmail for queueing 
messages that can be called with a few lines of code, thus without 
needing a large PHP package.

--

Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php