Re: mail() issue...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On 11/18/2004 04:42 PM, Paul Danko wrote:
I am building an application that uses the mail() command. I am running
on RedHat v9 with Apache v2 and PHP v4.3.8. The problem is, when I run
the mail() function, the submitting page is very slow (1-2 seconds), I
assume because it is waiting for the message to be queued up by
SendMail. Is there a way to fire off the mail command as a thread,
similar to the way to issues a command via the command prompt followed
by & to run it as a thread.

By default, sendmail attempts to send the message immediately to the recipients SMTP server. This is good for urgent messages delivery but bad if you want for instance send a newsletter to many users. In this case you need to change the delivery mode to just queue the messages and defer delivery.


You may want to take a look at this class that comes with a sendmail delivery sub-class that lets you control the delivery mode you want depending on your mailing purposes.

If you want to send messages to many users, just call the SetBulkMail() function. Take a look for instance at the test_personalized_bulk_mail.php example to see how to do it.

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux