hmmm...
i just copied your code and changed the email address to mine and it
worked. $message was set to 'blah'.
this tells me you either have a problem with your email address or
$message.
why don't you echo $message along with "Email NOT sent!".
mail messages are particular about their syntax.
mike
on 7/2/01 7:00 AM, Shrout, Ryan at [EMAIL PROTECTED] wrote:
> I am having a problem with the PHP mail() function. Here is the code:
>
> if (mail ("[EMAIL PROTECTED]", "Quote Request", $message)) {
> echo "Email sent!";
> } else {
> echo "Email NOT sent!";
> }
>
> Everytime, I receive the Email NOT sent message and the email isn't sent.
> However, from the console on the same machine, I can run the mail command:
> mail [EMAIL PROTECTED] and send an email just fine.
>
> Any ideas as to what could be wrong?
>
> I am using the latest PHP version and am running Red Hat Linux 7.1
>
> Ryan Shrout
-- mike cullerton [EMAIL PROTECTED]
--
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]