MailPHP Not working please help

Discussion in 'PHP' started by vincewarwick, Apr 4, 2009.

  1. #1
    Dear All,
    Can you please advise, I purchased a web template and just trying to solve an email script which keeps giving me blank information.

    Script as follows

    <?

    //name = _namex
    //email = _emailx
    //phone = _phonex
    //comments = _commx


    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= 'From: Sh Faisal' . "\r\n" .'Reply-To: company@gmail.com' . "\r\n";



    $ToEmail = "company@gmail.com";

    $ToName = "Your Name";
    $ToSubject = "New email";

    $EmailBody = "<table width='716' height='207' border='1' bgcolor='#090909'>
    <tr>
    <td><font size='2' face='Arial' color='#999999'>Sent By: $_namex \nSenders Email: $_emailx\n Message Sent:\n$_commx</font></td>
    </tr>
    </table>";

    $EmailFooter="\nThis message was sent by: $_namex from $REMOTE_ADDR ";

    $Message = $EmailBody.$EmailFooter;

    mail($ToName." <".$ToEmail.">",$ToSubject, $Message, $headers);


    Print "_root.Status=success";

    ?>
     
    vincewarwick, Apr 4, 2009 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    use $_POST['_emailx'] instead of $_emailx? maby that works.
     
    EricBruggema, Apr 15, 2009 IP
  3. jimbursch

    jimbursch Peon

    Messages:
    33
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I think the following should be on one line:

    $EmailBody = "<table width='716' height='207' border='1' bgcolor='#090909'>
    <tr>
    <td><font size='2' face='Arial' color='#999999'>Sent By: $_namex \nSenders Email: $_emailx\n Message Sent:\n$_commx</font></td>
    </tr>
    </table>";

    $EmailBody = "<table width='716' height='207' border='1' bgcolor='#090909'><tr><td><font size='2' face='Arial' color='#999999'>Sent By: $_namex \nSenders Email: $_emailx\n Message Sent:\n$_commx</font></td></tr></table>";
     
    jimbursch, Apr 15, 2009 IP