Re: mail function fails
| From: | mike cullerton | Date: | Mon, 02 Jul 2001 15:17:19 +0000 |
| Subject: | Re: mail function fails | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-55843@lists.php.net to get a copy of this message | ||
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 Rshrout@krauss-maffeicorp.com wrote:
> I am having a problem with the PHP mail() function. Here is the code:
>
> if (mail ("bsmall@ikmc.com", "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 bsmall@ikmc.com 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 michaelc@cullerton.com