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

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

 



On Sat, July 2, 2005 3:11 pm, Andy Pieters said:
> 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);

Not that it's relevant (almost for sure), but in this example, you use
$message where you probably want $body...

> echo ($result?"ok":"bogus");

> So anyone got any ideas?

You'd have to read the PHP source code to be certain, but let's assume
that PHP just uses whatever your sendmail setting in php.ini returns.

It's possible, though very unlikely, that you've done something silly
there like:

sendmail = "/usr/bin/sendmail -t ; return -1";

What's more likely is that something in the command line of sendmail is
returning some kind of warning, but it's still managing to send the
message.

If you can, su to the PHP user (see User directive in httpd.conf) and then
run some test sendmail commands from the shell.

Odds are really good you'll get a more detailed feedback than PHP's
simplistic true/false return value.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
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