NYCPHP Meetup

NYPHP.org

[nycphp-talk] mail function slows down page loading

Hans Zaunere hans at nyphp.org
Sat Sep 6 16:52:03 EDT 2003



> IIRC in Perl
> /usr/sbin/sendmail -q
> will queue the message.  It may make a difference -- I may also be blowin 
> smoke.

The -q flag to sendmail proper will run the current queue.  You'd need something like:

sendmail -ODeliveryMode=q

Nevertheless, this wouldn't help all that much, Peter.  The lag you're seeing is because sendmail is verifying the recipient address, DNS, etc.  When a message is queued, this verification still takes place.  Simply, it's a real pain to avoid this delay when sending mail from PHP, running embedded in Apache.  Long story short, you need to fork() out to a daemon; and this is particularly true when sending large amounts of mail.  This might be a good FUNDAMENTALS topic sometime.

H






More information about the talk mailing list