<?
$address = 'whomever@someplace.com';
$subject = 'c\'est un test';
$headers = 'Content-type: text/html\nFrom: me@someplace.com';
$body = <<<EOD
<head>
<title>$subject</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="100" border="1" cellspacing="0" cellpadding="0"
bgcolor="#33FF33" bordercolor="#0000FF" align="center">
<tr>
<td>
<div align="center">tests</div>
</td>
</tr>
</table>
<p align="center">c'est un test</p>
</body>
EOD;
mail($to, $subject, $body, $headers);
?>
Set the content-type in the email header. This will work with any HTML-aware mail reader. To send mail that also will work with readers that do not handle HTML, see the script library for an appropriate function.
Placez le contenu-type dans l'en-tête d'email. Ceci fonctionnera
avec n'importe quel lecteur de courrier de HTML-aware. Pour
envoyer le courrier qui également fonctionnera avec les lecteurs qui
ne manipulent pas le HTML, voyez la bibliothèque de séquence type pour une fonction appropriée.