Discussion: mail() Oulook
Afficher un message
Vieux 04/06/2007, 19h39   #1
misiek
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut mail() Oulook

In Outlook does not parse correctly when email is sent as hmtl

I use this code which I fountd on php.net

I just spent a few hours working on getting a simple html formatted
email to work on outlook. This is the end result:

<?php
$body="<em>HTML</em> formatted <strong>Message</strong";

$headers = "From: info@example.com \r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1 ";
$headers .= "MIME-Version: 1.0 ";
/*notice there aren't any \r\n after the second two header additions.
This is what made this version work correctly*/
mail("john@example.com", "An HTML Message", $body, $headers);
?>


the body shows up as a text/plain
  Réponse avec citation
 
Page generated in 1,69005 seconds with 9 queries