1
0

ajout de l'expediteur du message dans l'adresse de retour- Retrun-Path du mail

This commit is contained in:
Daniel Tartavel 2022-02-02 14:42:14 +01:00
parent 0a87a3a0cb
commit bd7c519426
2 changed files with 4 additions and 3 deletions

View File

@ -42,9 +42,9 @@
$mailText = $dicoExpe[$p['indexText']] .EOL .EOL ; $mailText = $dicoExpe[$p['indexText']] .EOL .EOL ;
print $objetMail . EOLH; print $objetMail . EOLH;
print $mailText . EOLH; print $mailText . EOLH;
envoiMail( $result['destMail'], $objetMail, $mailText, false); envoiMail($result['expeMail'], $result['destMail'], $objetMail, $mailText, false);
sleep(1); sleep(1);
envoiMail( $result['expeMail'], $objetMail, $mailText, true); envoiMail("contact@avion-poe.me", $result['expeMail'], $objetMail, $mailText, true);
sleep(1); sleep(1);
} }
} }

View File

@ -86,7 +86,8 @@ function envoiMail($destinataire, $sujet, $text, $html=false, $cc='', $bcc='')
$message->setBody($text); $message->setBody($text);
//add date header //add date header
$headers = $message->getHeaders(); $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)) if (!$mailer->send($message, $failures))
{ {
echo "Failures:"; echo "Failures:";