mail() sending to hotmail but nothing anything??!

Discussion in 'PHP' started by sjlogan88, Dec 2, 2008.

  1. #1
    Hi I have recently set up a contact form on a clients website, however the form handler is only sending it to hotmail account, not aol or the emails hosted on the server.

    I really need some help with this! I think it might be a headers problem. Here's some of the code.

    <?php

    $emailSubject = 'Online Enquiry';
    $webMaster = 'example@example.com';
    @extract($_POST);
    $name = stripslashes($name);
    $phone = stripslashes($phone);
    $email = stripslashes($email);
    $subject = stripslashes($subject);
    $message = stripslashes($message);

    //

    $date = (date ("F j, Y"));
    $time = (date ("H:i:s"));
    $IPnumber = getenv("REMOTE_ADDR");

    $_POST['phone'] = preg_replace("/[\n\r]+/", "", $_POST['phone']);
    $_POST['name'] = preg_replace("/[\n\r]+/", "", $_POST['name']);
    $_POST['subject'] = preg_replace("/[\n\r]+/", "", $_POST['subject']);
    $_POST['message'] = preg_replace("/[\n\r]+/", "", $_POST['message']);
    $_POST['email'] = preg_replace("/[\n\r]+/", "", $_POST['email']);

    $body = <<<EOD
    <h1>Example Message</h1>
    EOD;

    $headers = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=utf-8\r\n";
    $headers .= "From: example <example@example.com>\r\n";
    $success = mail($webMaster, $emailSubject, $body, $headers);
    ?>

    Any help would be greatly appreciated! Thanks a lot.
     
    sjlogan88, Dec 2, 2008 IP
  2. wmtips

    wmtips Well-Known Member

    Messages:
    601
    Likes Received:
    70
    Best Answers:
    1
    Trophy Points:
    150
    #2
    Enter your server IP here and find out if your reverse DNS is properly configured.
     
    wmtips, Dec 2, 2008 IP