Re: mail()===false but msg is sent!

From: Date: Sun, 03 Jul 2005 00:34:59 +0000
Subject: Re: mail()===false but msg is sent!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-218039@lists.php.net to get a copy of this message
Hello, on 07/02/2005 07:11 PM Andy Pieters said the following:
Hi all I have this situation where mail() returns a false status but the message is
actually accepted AND reaches destination! The PHP Version is 4.3.10, the OS Linux So what I do is ( $header="header for multipart mime message"; $body="body with multipart mime message"; $result=mail("Name Firstname <$address>","Subject",$message,$header); echo ($result?"ok":"bogus"); So anyone got any ideas?
The mail function practically never fails under Linux because it just handles the message to sendmail program or equivalent. This may be a mail() function bug. In any case, you may want to try this class that comes with a wrapper function named sendmail_mail(). It works like mail() and takes the same arguments but it calls sendmail program directly. If it also fails, it may be a problem in your sendmail installation. Otherwise, it is a problem in the mail() function. 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 -- 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

« previous php.general (#218039) next »