Jump to content


Photo

E-Mail Problem 1


  • Please log in to reply
3 replies to this topic

#1 ShanesProjects

ShanesProjects
  • Members
  • PipPip
  • Member
  • 21 posts

Posted 16 October 2006 - 11:58 PM

How do I make my code make the $Message3 seen as HTML.

//Part One
$Header = "$Subject: Sent By $EMail";
$Message2 = wordwrap($Message, 40, "<br />\n");
$Message3 = "<center>Name: $FirstName $LastName</center>
             <center>Message: $Message2</center><br /><br /><br />
             <center><a href='Admin_Ban_From_E_Mail.php?IP=$Ip'>Ban This Ip: $Ip</a></center>";

//Part Two
mail($Send_To, $Subject, $Header, $Message3);


#2 marcus

marcus
  • Members
  • PipPipPip
  • Advanced Member
  • 1,842 posts
  • LocationRochester, NY

Posted 17 October 2006 - 12:09 AM

<?
    //change this to your email.
    $to = "m@maaking.com";
    $from = "m2@maaking.com";
    $subject = "Hello! This is HTML email";

    //begin of HTML message
    $message = "<html>
  <body bgcolor=\"#DCEEFC\">
    <center>
        <b>Looool!!! I am reciving HTML email......</b> <br>
        <font color=\"red\">Thanks Mohammed!</font> <br>
        <a href=\"http://www.maaking.com/\">* maaking.com</a>
    </center>
      <br><br>*** Now you Can send HTML Email <br> Regards<br>MOhammed Ahmed - Palestine
  </body>
</html>";
   //end of message

    // To send the HTML mail we need to set the Content-type header.
    $headers = "MIME-Version: 1.0rn";
    $headers .= "Content-type: text/html; charset=iso-8859-1rn";
    $headers  .= "From: $from\r\n";
    //options to send to cc+bcc
    //$headers .= "Cc: [email]maa@p-i-s.cXom[/email]";
    //$headers .= "Bcc: [email]email@maaking.cXom[/email]";
    
    // now lets send the email.
    mail($to, $subject, $message, $headers);

    echo "Message has been sent....!";
?> 

or

<?
    //change this to your email.
    $to = "m@maaking.com";
    $from = "m2@maaking.com";
    $subject = "Hello! This is HTML email";

    //begin of HTML message
    $message = <<<EOF
<html>
  <body bgcolor="#DCEEFC">
    <center>
        <b>Looool!!! I am reciving HTML email......</b> <br>
        <font color="red">Thanks Mohammed!</font> <br>
        <a href="http://www.maaking.com/">* maaking.com</a>
    </center>
      <br><br>*** Now you Can send HTML Email <br> Regards<br>MOhammed Ahmed - Palestine
  </body>
</html>
EOF;
   //end of message
    $headers  = "From: $from\r\n";
    $headers .= "Content-type: text/html\r\n";

    //options to send to cc+bcc
    //$headers .= "Cc: [email]maa@p-i-s.cXom[/email]";
    //$headers .= "Bcc: [email]email@maaking.cXom[/email]";
    
    // now lets send the email.
    mail($to, $subject, $message, $headers);

    echo "Message has been sent....!";
?> 


#3 ShanesProjects

ShanesProjects
  • Members
  • PipPip
  • Member
  • 21 posts

Posted 17 October 2006 - 12:22 AM

Its Fixed.

#4 marcus

marcus
  • Members
  • PipPipPip
  • Advanced Member
  • 1,842 posts
  • LocationRochester, NY

Posted 17 October 2006 - 12:22 AM

:)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users