mail() returns a true/false value to indicate success or failure.
Though I can never remember which means which, and the docs are not too
clear...

if (mail('[EMAIL PROTECTED]', 'test', 'test')){
    echo "mail returned true<BR>\n";
}
else{
    echo "mail returned false<BR>\n";
}

Also, there's some way of examining the mail queue for sendmail.  I have
absolutely no clue whatsoever how this is done, and man sendmail is entirely
too long and convoluted for me to try to find out. :-)  But you probably
have more patience and/or are smarter than me anyway.

If you're like 99.999% of the users that mess up, you left off the quotes in
php.ini:
sendmail_path = "/usr/local/bin/sendmail -t"

The quotes in the sample in php.ini were for real, not just for show.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: "Jacky" <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Monday, February 19, 2001 2:15 AM
Subject: [PHP] mail() test method


Hi people
My mail() script does not work, sniplet is simple that could not go wrong. I
suspect there is something wrong with the php config on the server. Question
is that how do I check it out if my assumption is correct? Is there any
method that make php to write out something of the mail() does not work?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to