ShanesProjects Posted October 16, 2006 Share Posted October 16, 2006 How do I make my code make the $Message3 seen as HTML.[code]//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 Twomail($Send_To, $Subject, $Header, $Message3);[/code] Link to comment https://forums.phpfreaks.com/topic/24162-e-mail-problem-1/ Share on other sites More sharing options...
marcus Posted October 17, 2006 Share Posted October 17, 2006 [code]<? //change this to your email. $to = "[email protected]"; $from = "[email protected]"; $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][email protected][/email]"; //$headers .= "Bcc: [email][email protected][/email]"; // now lets send the email. mail($to, $subject, $message, $headers); echo "Message has been sent....!";?> [/code]or[code]<? //change this to your email. $to = "[email protected]"; $from = "[email protected]"; $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][email protected][/email]"; //$headers .= "Bcc: [email][email protected][/email]"; // now lets send the email. mail($to, $subject, $message, $headers); echo "Message has been sent....!";?> [/code] Link to comment https://forums.phpfreaks.com/topic/24162-e-mail-problem-1/#findComment-109803 Share on other sites More sharing options...
ShanesProjects Posted October 17, 2006 Author Share Posted October 17, 2006 Its Fixed. Link to comment https://forums.phpfreaks.com/topic/24162-e-mail-problem-1/#findComment-109812 Share on other sites More sharing options...
marcus Posted October 17, 2006 Share Posted October 17, 2006 :) Link to comment https://forums.phpfreaks.com/topic/24162-e-mail-problem-1/#findComment-109813 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.