Hey ,
I'm having a problem getting PHP to send e-mail using the mail function.My server seems to be running PHP fine but no luck with e-mail. I've done exactly what I was told. Is there a chance that it is not enabled on my server? how do I check?
please help if you can!!

here's my PHP script:
<?
$ToEmail = "dougwood@attbi.com";
$ToName = "Doug";
$ToSubject = "oh god please work";
$EmailBody = "Sent By: $userName\nSenders Email: $userAddress\nMessage Sent:\n$comment\n\n";

$EmailFooter="\nThis message was sent by: $userName from $REMOTE_ADDR If you feel that you recieved this e-mail by accident please contact us at www.somesite.com";

$Message = $EmailBody.$EmailFooter;

mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$FirstName." <".$Email.">");
?>

    thanks for the response.
    I wish it were that easy!
    but no luck.
    hmm...

      15 days later

      What is your Web server?
      I had same problem when I used Apache 1.3.20.
      After I updated Apache to 1.3.24, it works fine.

        a month later

        have you checked to see whether the server has the correct smtp setting and a sendmail_from setting in php.ini? run phpinfo() to have a look. on windows this mattters, actually i can't get my wondows box to do it either !

        http://php.weblogs.com/stories/storyReader$67

          Write a Reply...