PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > alt.comp.lang.php > mail() Oulook
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
mail() Oulook

Réponse
 
LinkBack Outils de la discussion
Vieux 04/06/2007, 19h39   #1
misiek
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut mail() Oulook

In Outlook does not parse correctly when email is sent as hmtl

I use this code which I fountd on php.net

I just spent a few hours working on getting a simple html formatted
email to work on outlook. This is the end result:

<?php
$body="<em>HTML</em> formatted <strong>Message</strong";

$headers = "From: info@example.com \r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1 ";
$headers .= "MIME-Version: 1.0 ";
/*notice there aren't any \r\n after the second two header additions.
This is what made this version work correctly*/
mail("john@example.com", "An HTML Message", $body, $headers);
?>


the body shows up as a text/plain
  Réponse avec citation
Vieux 06/06/2007, 17h24   #2
C.
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: mail() Oulook

On 4 Jun, 19:39, misiek <michal_augustyn...@gazeta.pl> wrote:
> In Outlook does not parse correctly when email is sent as hmtl
>
> I use this code which I fountd on php.net
>
> I just spent a few hours working on getting a simple html formatted
> email to work on outlook. This is the end result:
>
> <?php
> $body="<em>HTML</em> formatted <strong>Message</strong";
>
> $headers = "From: i...@example.com \r\n";
> $headers .= "Content-Type: text/html; charset=ISO-8859-1 ";
> $headers .= "MIME-Version: 1.0 ";
> /*notice there aren't any \r\n after the second two header additions.
> This is what made this version work correctly*/
> mail("j...@example.com", "An HTML Message", $body, $headers);
> ?>
>
> the body shows up as a text/plain



Outlook is broken in many regards, but this is not one of them. Try
viewing the source of an email which seems to behave correctly in
Outlook. You should find that it complies with rfc2183 - i.e. the
content-disposition on the HTML MIME section is inline.

C.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h21.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07137 seconds with 10 queries