<?php
//Mail to
$to = "[email protected]";
//Subject
$subject = "Message HTML";
//Message
$message = "<h1>Apprendre HTML</h1>
<p>Pour en savoir plus : <A href='http://htmldom.edu'>Site pour HTML</A>";
// Pour envoyer un mail HTML, l'en-tête Content-type doit être défini
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// En-têtes additionnels
$headers .= 'To: toto <[email protected]>\r\n";
$headers .= 'From: Moi <[email protected]>\r\n";
// Envoi
mail($to, $subject, $message, $headers);
?>