Hi there,
I've just bought a flash component that allows me to add a form into my flash site.
It's working fine but the email that I receive back from it is not very easy to read.
The email is in a html format and I wish to add some formatting to change the font type to a san-serif.
Here is the code below: I've marked in red the additional code I've added in an attempt to fix it.
However since adding this section of code it's now stopped working.
(no emails come through)
// subject
$subject = "Demo request from $name";
// message
$message = "
<html>
<head>
<style type="text/css">
html {
font-family:Arial,sans-serif;
}
</style>
</head>
<body>
<tr bgcolor='#FFFFFF'>
<td valign='top'><b>$subject</b></td><br>
<td> </td>
</tr>
<table border= '0' cellpadding='0' cellspacing='0' bgcolor='#FFFFFF'>
<tr bgcolor='#FFFFFF'>
<td valign='top'><b>Email:</b></td>
<td>$email</td>
</tr>
<tr bgcolor='#FFFFFF'>
<td valign='top'><b>Company:</b></td>
<td>$company</td>
</tr>
<tr bgcolor='#FFFFFF'>
<td valign='top'><b>Phone:</b></td>
<td>$phone</td>
</tr>
<tr bgcolor='#FFFFFF'>
<td valign='top'><b>Comments:</b></td>
<td>$comments</td>
</tr>
<tr bgcolor='#FFFFFF'>
<td valign='top'><b>Location:</b></td>
<td>$county</td>
</tr>
</table>
</body>
</html>
";
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'From: '.$email. "\r\n" .
'Reply-To: adam.casey@mycompany.com' . "\r\n" .
'Bcc: adam.casey@mycompany.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
// Mail it
mail($to, $subject, $message, $headers);
?>