HTML email
Hi,
for some reason I cannot get the emails to output html emails. It will work if I set $message to say "<IMG height=110 alt=Google src=\"http://www.google.co.uk/intl/en_uk/images/logo.gif\" width=276> " in the same file but if I make $message = $html it does not work. I have echoed it out and the value in $html is the exact html code I want to go to the emails. All that happens is that it displays the html code in the email not the google logo as it should. What am I doing wrong?
Regards
Rob
<?
$radio = $_REQUEST['group1'];
$html = $_REQUEST['pageContent'];
// connect to the mysql database server.
$linkid = mysql_connect (,,)or die(mysql_error());
//select the database
mysql_select_db("",$linkid) or die(mysql_error());
//queries******************************************* ************************************************** *********
$massmail="SELECT email FROM massmailtest WHERE email != ''";
$result=mysql_query($massmail);
while($row = mysql_fetch_array($result, MYSQL_NUM)){
$name =$row['0'];
$str.=$name.", ";//converts to a string and puts a sep.
}
//mail********************************************** ************************************************** *********
$to = "$str";
$subject = 'two';
$message = "$html";
$headers = 'MIME-Version: 1.0' . "\/r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
mail($to, $subject, $message, $headers);
echo"$message";
mysql_free_result($result);
?>
|