• GoDaddy Community
  • Websites + Marketing | Website Builders
  • Websites + Marketing | Website Builders

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 
    New

    Contact Form (POFO) not working on Linux

    Hi there

    I'm having trouble getting the contact form for POFO (theme) to work. When I click send message, it says that the message was sent. However...no email is sent or arrives. And there aren't any errors showing up on the error log. Here is the php:

     


    <?php
    if(isset($_POST['email'])){

    $name =$_POST["name"];
    $from =$_POST["email"];
    $subject=$_POST["subject"];
    $comment=$_POST["comment"];

    // Email Receiver Address
    $receiver="info@emergebuzz.com";
    $subject="Let's Get Started -- Contact Us";

    $message = "
    <html>
    <head>
    <title>HTML email</title>
    </head>
    <body>
    <table width='50%' border='0' align='center' cellpadding='0' cellspacing='0'>
    <tr>
    <td colspan='2' align='center' valign='top'><img style=' margin-top: 15px; ' src='http://www.emergebuzz.com/images/logo-email.png' ></td>
    </tr>
    <tr>
    <td width='50%' align='right'>&nbsp;</td>
    <td align='left'>&nbsp;</td>
    </tr>
    <tr>
    <td align='right' valign='top' style='border-top:1px solid #dfdfdf; font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#000; padding:7px 5px 7px 0;'>Name:</td>
    <td align='left' valign='top' style='border-top:1px solid #dfdfdf; font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#000; padding:7px 0 7px 5px;'>".$name."</td>
    </tr>
    <tr>
    <td align='right' valign='top' style='border-top:1px solid #dfdfdf; font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#000; padding:7px 5px 7px 0;'>Email:</td>
    <td align='left' valign='top' style='border-top:1px solid #dfdfdf; font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#000; padding:7px 0 7px 5px;'>".$from."</td>
    </tr>
    <tr>
    <td align='right' valign='top' style='border-top:1px solid #dfdfdf; font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#000; padding:7px 5px 7px 0;'>Subject:</td>
    <td align='left' valign='top' style='border-top:1px solid #dfdfdf; font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#000; padding:7px 0 7px 5px;'>".$subject."</td>
    </tr>
    <tr>
    <td align='right' valign='top' style='border-top:1px solid #dfdfdf; border-bottom:1px solid #dfdfdf; font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#000; padding:7px 5px 7px 0;'>Message:</td>
    <td align='left' valign='top' style='border-top:1px solid #dfdfdf; border-bottom:1px solid #dfdfdf; font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#000; padding:7px 0 7px 5px;'>".nl2br($comment)."</td>
    </tr>
    </table>
    </body>
    </html>
    ";
    // Always set content-type when sending HTML email
    $headers = "MIME-Version: 1.0" . "\r\n";
    $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
    // More headers
    $headers .= 'From: <'.$from.'>' . "\r\n";
    if(mail($receiver,$subject,$message,$headers))
    {
    //Success Message
    echo "The message has been sent!";
    }
    else
    {
    //Fail Message
    echo "The message could not been sent!";
    }

    }
    ?>


    I have checked the spam, and there is nothing there. I have also tested the email (info@emergebuzz.com) from several other email programs, etc. and it works from all. So the email isn't the issue.

    Can you please help? You can find the site here: emergebuzz.com

    Thank you!

    1 REPLY 1
    Highlighted
    Helper V
    Helper V

    Re: Contact Form (POFO) not working on Linux

    @BBkins,

     

    Checked on local server!, getting a blank page...

    http://reusableforms.com/d/e/php-contact-form-code

    Please refer to the above code...

     

    Thank you

     

    Regards,

     

    Praveen Thomas

    GoDaddy 24/7 Support www.x.co/247support
    ----->NEXIA