Re: Mailing problem
| From: | Manuel Lemos | Date: | Fri, 16 May 2003 13:41:55 +0000 |
| Subject: | Re: Mailing problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147889@lists.php.net to get a copy of this message | ||
Hello,
On 05/16/2003 01:25 AM, James Day wrote:
I've written a script using the mail() function to send an email on a FreeBSD box. When I run the script, the page takes about 20 seconds to load (obviously sending the mail). The page loads and the mail is sent fine. Can anyone explain what might be the cause of the delay or how to fix it ?That is usually a sendmail configuration issue. The default is to send the message immediately to the destination SMTP server and that may take some time. The solution is to use the right switches to just leave the message on the queue for later processing instead of attempting to send immediately. In that case you may want to try this class that has a sub class especialized in message delivery using sendmail. It lets you choose different delivery options. If you do not want to change your code much, the class comes with a wrapper function named sendmail_mail() that emulates mail() but you can use it as a replacement allowing to configure the delivery options. http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/