bruno a écritBonjour,
Tu as des problèmes dans tes en-têtes, le Content-type doit être sur une seule ligne entre autres.
Dans l'en-tête :
Content-Transfer-Encoding: 8Bit
dans la partie texte :
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"
dans la partie html :
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="UTF-8"
Bonjour bruno, et bien merci pour toutes ces interventions toujours ciblées, celles ici et d'autres sur d'autres topics ! merci. 🙂
Ça remarche sauf à quelques détails près.
Je remets ici mes header pour être sûr que c'est ok :
Reply-to: No reply required <no-reply@domaine.com>
From: No reply required <no-reply@domaine.com>
Cc: oliver@gmail.com
Bcc: oliver@yahoo.com
Disposition-Notification-To: <admin@domaine.com>
Return-Receipt-To: <admin@domaine.com>
X-Sender: <https://domaine.com>
X-Mailer: PHP/7.2.15-0ubuntu0.18.04.1
X-Priority: 2
X-auth-smtp-user: No reply required <no-reply@domaine.com>
X-abuse-contact: No reply required <no-reply@domaine.com>
Date: Thu, 21 Mar 2019 19:07:22 -0400
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: multipart/alternative; boundary="_----------=_parties_41f2b1388a6dbaa71c8971824b3694d0"--_----------=_parties_41f2b1388a6dbaa71c8971824b3694d0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Ici la version texte
--_----------=_parties_41f2b1388a6dbaa71c8971824b3694d0
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Génération de code</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
// code html etc
</body>
</html>
--_----------=_parties_41f2b1388a6dbaa71c8971824b3694d0--
Il me semble que y a quelque chose en trop ici : Content-Type: multipart/alternative; boundary="_----------=_parties_41f2b1388a6dbaa71c8971824b3694d0"--_----------=_parties_41f2b1388a6dbaa71c8971824b3694d0
Non ?
Je disais quelques détails près, mais ce n'est peut-être pas le problème des headers...
J'ai trouvé un script d'email responsive qui marche bien sauf pour l'affichage d'image... ça bloque sur gmail alors que celles-ci sont autorisées, et sur hotmail.
Aussi, sur hotmail, mon mail va en spam jusqu'à ajout de l'adresse au carnet d'adresse, sur gmail ok et sur mon client ok aussi. Sur yahoo, c'est tout ok, même pour l'image qui s'affiche correctement, ainsi que sur mon client local (thunderbird)
Il y a t-il un moyen de savoir si un mail arrive en spam chez le destinataire ?
[edit]
Pour Content-Type: multipart/alternative; boundary="_----------=_parties_41f2b1388a6dbaa71c8971824b3694d0"--_----------=_parties_41f2b1388a6dbaa71c8971824b3694d0, je crois qu'il me manquait un saut à la ligne :
Date: Thu, 21 Mar 2019 19:28:48 -0400
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: multipart/alternative; boundary="_----------=_parties_cc286f8ba1417adfe69f6cbbf41fa36b"
--_----------=_parties_cc286f8ba1417adfe69f6cbbf41fa36b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable