Re: Getting mail() to return false/0

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

 




----- Original Message ----- From: "Paul Reinheimer" <preinheimer@xxxxxxxxx>


Hi,

I was working with the mail function today to experiment with sending
a few messages, and threw in the apropriate checks so when mail()
can't send the message the apropriate errors were raised, however, I
discovered I couldn't actually get mail() to return 0. Take the
following call:
mail("dude", "Daily Feed Update", "body");

I assume "dude" is a local user you are mailing to? Make sure you also give a FROM address. Try this:


mail("dude@xxxxxxxxxx", "Daily Feed Update", "body", "From: me@xxxxxxxxxxxx")

-Trav


When I run that exact call (well, I prepend echo, but you get the idea) it returns 1. I can't for the life of me understand why my MTA would accept an email with a destination of 'dude'.

Any thoughts?



paul
--
Paul Reinheimer

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