Forum Moderators: coopster
// subject
$subject = 'eNewsletter - January 2007';
// message
$message = file_get_contents("index.htm");
// 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 .= 'To: <abc@domain.com>' . "\r\n";
$headers .= 'From: Saad <saad@domain.com>' . "\r\n";
// Mail it
mail($to, $subject, $message, $headers);
?>
Result: HTML tags appearing in outlook instead of proper layout.
Saad;
<html>
<head>
<title>Newsletter - February 2007</title>
<link href="text.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="600" ......
</body>
</html>
Before it was
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Newsletter - February 2007</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="text.css" rel="stylesheet" type="text/css">
</head>
<body>
......
</body>
</html>
but result is same in both cases.
<http://www.domain.com> <http://www.domain.com/support.php> Contact Us <http://www.domain.com/support.php>
<http://www.domain.com/eNewsletters/2006_FEB/images/header_pic.gif>
--> Issue - February 2007
<http://www.domain.com/eNewsletters/2006_FEB/images/logo.gif>
Publications<http://www.domain.com/eNewsletters/2006_FEB/images/publications.gif>
I see the URLs plus enclosed text (hyperlinks) in my output.
Saad;