|
Posted by Thierry on 11/13/89 11:30
Hello.
Is it possible to send an email with some HTML code ?
I tried the following code, where $msg == '<html><body>... blah blab
blah etc.</body></html>' :
// Adresse de l'expediteur
$entete = "From: $from \n";
// Copie du message
$entete .= "Cc: $cc \n";
// Copie cachée
$entete .= "Bcc: $bcc \n";
// Adresse de réponse
$entete .= "Reply-To: $from \n";
$entete .= 'X-Mailer: PHP/' . phpversion() . '\n';
// On peut ajouter ses propres en-tête
$entete .= 'X-CeQueVousVoulez: Contact EASYJOKE \n';
// Type MIME
$entete .= 'Content-Type: text/plain; charset=iso-8859-1 \n';
// Encodage
$entete .= 'Content-Transfer-Encoding: 8bit \n';
mail($to, $subject, $msg, $entete);
Any help would be welcome...
Thx Titi
Navigation:
[Reply to this message]
|