par
agité » 14 mars 2008, 12:48
bonjour
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);
?>
Tu as des scripts tout fait pour l'envois de mail :
http://www.vulgarisation-informatique.com/mail.php
[quote="karenma"]bonjour
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]
<?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);
?>
[/code][/quote]
Tu as des scripts tout fait pour l'envois de mail : http://www.vulgarisation-informatique.com/mail.php