SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2001
    Location
    Ohio
    Posts
    142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What's wrong with this mail form?

    I get the following error when running this mail script:

    Warning: mail() is not supported in this PHP build in /home/sianews/public_html/form/interviews.php3 on line 12

    Warning: Cannot add header information - headers already sent by (output started at /home/sianews/public_html/form/interviews.php3:12) in /home/sianews/public_html/form/interviews.php3 on line 14


    <?php

    $msg = "Guest:\t$guest\n";
    $msg .= "Website:\t$website\n";

    $recipient = "webmaster@sianews.com";
    $subject = "Interview Submission";

    $mailheaders = "From: Sianews <Sianews> \n";
    $mailheaders .= "Reply-To: $sender_email\n\n";

    mail($recipient, $subject, $msg, $mailheaders);

    header("Location: http://www.sianews.com/thanks.php");

    ?>
    http://www.sianews.com: an independent, politically conservative news site

  2. #2
    SitePoint Addict manipura's Avatar
    Join Date
    Apr 2001
    Location
    Calgary,AB
    Posts
    345
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The Script works fine, Its your PHP Installation that isn't working. Its not supporting the mail() function

  3. #3
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What version of PHP are you running? And what platform are you running it on?
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  4. #4
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    mail() is supported in all versions 3-4 (pretty sure in fi as well?)

    anyway, run <?phpinfo();?> and search for the 'sendmail_path' value in the PHP Core configuration section, and check the path to sendmail - if its not there then your host has disabled the mail() function- which is strange, if it is there then the path is wrong or the mailserver is spouted, either way a good shouting at your host should help.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •