A
Anonymous
Guest
Hi guys,
I am trying to use html code as content of the email i sending out by using php but why the email my friends received are all in text format ???
what should i do to make my html code works in an email... i have created a html file and want to send it out as newsletter.. what i did is copy all the html code from the file and paste it as value for $contents but this doesn't seem to work.,,
please advise what i suppose to do,, is it i missed some header ??
I am trying to use html code as content of the email i sending out by using php but why the email my friends received are all in text format ???
what should i do to make my html code works in an email... i have created a html file and want to send it out as newsletter.. what i did is copy all the html code from the file and paste it as value for $contents but this doesn't seem to work.,,
please advise what i suppose to do,, is it i missed some header ??
Code:
// connect to db code..
$to = "{$row['email']}\r\n";
//$from= "From: $name < $email >\r\n";
$from= "From: testing while< myemail >\r\n";
$subject ="$subject\r\n";
if($mailtype != "html")
{
$MailText = stripslashes($MailText);
}
$contents ="$MailText";
mail($to,$subject,$contents,$from);