Hey,
I want to be able to send HTML emails out to registered users on my web site. But when I send the email using an online form, it doesn't send it in HTML I don't think. I just get text, I don't get any of the flash movies or anything else like that showing?? My code is below but I've been looking at all of the HTML email articles and I've done exactly what they say to do. Any ideas?
<?php
set_time_limit(20000);
$landps = array("myurldb", "localhost", "user", "pass");
$database = $landps[0];
$host = $landps[1];
$username = $landps[2];
$password = $landps[3];
$table = 'test';
$Subject = trim ($Subject);
$Message = trim ($Message);
$URL = 'http://www.myurl.net/admin/';
mysql_connect ($host,$username,$password) or die ("Failed login.");
mysql_select_db ($database) or die ("Failed to access db.");
/* recipients */
$to = "Chris<chris@myurl.net>";
/* subject */
$subject = "Hello";
/* message */
$Email = '
<html>
<head>
<title>Test Email</title>
<link href="http://www.myurl.net/oipstyle.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="FFFAED">
<div align="center">
<table width="571" border="0" cellpadding="0" cellspacing="0" class="Normal">
<tr>
<td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="571" height="88">
<param name="movie" value="http://www.myurl.net/flash/top.swf">
<param name="quality" value="high">
<embed src="http://www.myrul.net/flash/top.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="571" height="88"></embed></object></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><div align="justify">$Message</div></td>
</tr>
</table>
</div>
</body>
</html>
';
/* To send HTML mail, you can set the Content-type header. */
$From = 'Chris <chris@myurl.net>';
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/* additional headers */
$headers .= "From: $From\r\n";
/* and now mail it */
mail($to, $subject, $Email, $headers);
header("Location: $URL");
?>