Bonjour
J'utilise la fonction mail sur mes pages PHP mais je ne sait pas comment changer la couleur,la police,du mail envoyé.
Comment faire?
Merci d'avance pour votre aide
Code : Tout sélectionner
<?php
$titre = "essai1";
$boundary = md5(uniqid(rand()));
$header =" ";
$header .="From: php <[email protected]>n";
$header .="Reply-To: [email protected]\n";
$header .="MIME-Version: 1.0\n";
$header .="Content-Type: multipart/alternative;
boudary=$boundary\n";
$sujet = "";
$sujet = "\nThis is a multi-part message in MIME format.";
$sujet .= "\n--$boundary\nContent-Type: text/html;
charset=\"iso-8859-1\"\n\n";
$sujet .= "<html><body>\n";
$sujet .= " <font color='red'>Bonjour </font> ";
$sujet .= "</body></html>\n";
$sujet .= "\n--$boundary--\n end of the multi-part";
Mail("$mail",$titre,$sujet,$header);
?>
Tu as des scripts tout fait pour l'envois de mail : http://www.vulgarisation-informatique.com/mail.phpbonjour
j'ai tenté du html mais le problème c qu'il m'affiche en toutes lettrres <html> et<font> dans le mail comment y remédier
Merci d'avance
Code : Tout sélectionner
<?php $titre = "essai1"; $boundary = md5(uniqid(rand())); $header =" "; $header .="From: php <[email protected]>n"; $header .="Reply-To: [email protected]\n"; $header .="MIME-Version: 1.0\n"; $header .="Content-Type: multipart/alternative; boudary=$boundary\n"; $sujet = ""; $sujet = "\nThis is a multi-part message in MIME format."; $sujet .= "\n--$boundary\nContent-Type: text/html; charset="iso-8859-1"\n\n"; $sujet .= "<html><body>\n"; $sujet .= " <font color='red'>Bonjour </font> "; $sujet .= "</body></html>\n"; $sujet .= "\n--$boundary--\n end of the multi-part"; Mail("$mail",$titre,$sujet,$header); ?>