diff --git a/inc/facteur.php b/inc/facteur.php index 06b90c0..3195f8e 100644 --- a/inc/facteur.php +++ b/inc/facteur.php @@ -209,7 +209,11 @@ function facteur_envoyer_mail($destinataires, string $sujet, array $message, int strpos($h, ':') !== false and strncmp($h, 'Content-Type:', 13) !== 0 ) { - $facteur->AddCustomHeader($h); + if (strpos($h, 'Message-ID:') === 0) { + $facteur->MessageID = trim(explode(':', $h, 2)[1]); + } else { + $facteur->AddCustomHeader($h); + } } } }