Je rencontre un comportement étrange en testant la fonction mail(). Quand j'appelle le fichier avec Firefox, l'envoi s'effectue normalement. En revanche, quand j'appelle la même page avec Google Chrome, l'envoi est effectué en double. C'est fâcheux ! Avez-vous entendu parler de ce bogue ?
Le code, expérimental, de ma page est pourtant des plus basiques...
$boundary = "nextPart";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "From: Me <[email protected]>\r\n";
$headers .= "Content-Type: multipart/alternative; boundary = $boundary\r\n";
//text version
$headers .= "\n--$boundary\n"; // beginning \n added to separate previous content
$headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
$headers .= "This is the plain version";
//html version
$headers .= "\n--$boundary\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "This is the <b>HTML</b> version";
mail("[email protected]", "An HTML Message", "", $headers); // J'ai anonymisé l'adresse délibérement
Merci pour votre aide.Cordialement,
Gaspard