diff --git a/cron.php b/cron.php index 5b13918..1223c9a 100644 --- a/cron.php +++ b/cron.php @@ -42,9 +42,9 @@ $mailText = $dicoExpe[$p['indexText']] .EOL .EOL ; print $objetMail . EOLH; print $mailText . EOLH; - envoiMail( $result['destMail'], $objetMail, $mailText, false); + envoiMail($result['expeMail'], $result['destMail'], $objetMail, $mailText, false); sleep(1); - envoiMail( $result['expeMail'], $objetMail, $mailText, true); + envoiMail("contact@avion-poe.me", $result['expeMail'], $objetMail, $mailText, true); sleep(1); } } diff --git a/include/envoi_courriel.inc.php b/include/envoi_courriel.inc.php index 9e64a2c..06a4da6 100644 --- a/include/envoi_courriel.inc.php +++ b/include/envoi_courriel.inc.php @@ -86,7 +86,8 @@ function envoiMail($destinataire, $sujet, $text, $html=false, $cc='', $bcc='') $message->setBody($text); //add date header $headers = $message->getHeaders(); - $headers->addDateHeader('Your-Header', new DateTimeImmutable('3 days ago')); + //$headers->addDateHeader('Date', new DateTimeImmutable('3 days ago')); + $headers->addPathHeader('Return-Path', $expediteur); if (!$mailer->send($message, $failures)) { echo "Failures:";