Mail Function showing header info

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • empiresolutions
    New Member
    • Apr 2006
    • 162

    Mail Function showing header info

    I am using a standard mail function within an AMFPHP Class that i have used many times. Now, when i use it it does not work right. When a mail is sent, the $header info and html shows in the email.

    I would like to know why the header info is showing in the email, along with why the HTML code is not rendering. I will post examples of code and result. Please provide a solution b4 i pull my hair out.

    Running PHP 4.3.9 on Apache

    [PHP]
    function sendMail($vars) {

    $email = "visitor@site.c om";

    $headers ="MIME-Version: 1.0\r\n";
    $headers .= "From: {$email}\r\n";
    $headers .= "Return-Path: {$email}\n";
    $headers .= "Reply-To: {$email}\n";
    $headers .= "Message-Id: <".time()."@".$ _SERVER['SERVER_NAME'].">\n";
    $headers .= "X-Mailer: php-mail-function-0.2\n";

    $content = "<b>test</b>";

    mail("email@exa mple.com", "Subject", $content, $headers);
    }
    [/PHP]

    This is the email that is returned.
    Code:
    From: visitor@site.com
    Reply-To: visitor@site.com
    Message-Id: <1185426433@www.example.com>
    X-Mailer: php-mail-function-0.2
    
    <b>test</b>
  • empiresolutions
    New Member
    • Apr 2006
    • 162

    #2
    Solution: http://phpbuilder.com/board/showthread.php? p=10816175#post 10816175

    Comment

    • pbmods
      Recognized Expert Expert
      • Apr 2007
      • 5821

      #3
      Heya Empiresolutions .

      Glad to hear you got it working! Good luck with your project, and if you ever need anything, post back anytime :)

      Comment

      Working...