From 276a21b3a3a49311de1157021ebc37faf6a41fa4 Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Wed, 2 Feb 2022 14:43:34 +0100 Subject: [PATCH] ajout de l'expediteur du message dans l'adresse de retour- Return-Path du mail --- include/envoi_courriel.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/envoi_courriel.inc.php b/include/envoi_courriel.inc.php index 06a4da6..45d9bd8 100644 --- a/include/envoi_courriel.inc.php +++ b/include/envoi_courriel.inc.php @@ -20,7 +20,7 @@ function courrielEnvoi( $db ) $mailText = $result['text']; $html = $result['html']; - saveMail( $db, $db->expeMail, $objetMail, $mailText, $html); + saveMail( $db, "contact@avion-poe.me", $db->expeMail, $objetMail, $mailText, $html); //log_write(print_r($db,true)); @@ -47,16 +47,16 @@ function courrielEnvoi( $db ) { $message = "\n" . $message . ""; } - saveMail( $db, $db->destMail, $objetMail, $mailText, $html); + saveMail( $db, $db->expeMail, $db->destMail, $objetMail, $mailText, $html); } -function saveMail( $db, $destinataire, $objet, $text, $html=false) +function saveMail( $db, $expediteur, $destinataire, $objet, $text, $html=false) { $query = "INSERT INTO courriels VALUES ('0', '" . $db->protect($destinataire) . "', '" . $db->protect($objet) . "', '" . $db->protect($text) . "', '" . (int)$html . "')"; $db->query($query); } -function envoiMail($destinataire, $sujet, $text, $html=false, $cc='', $bcc='') +function envoiMail($expediteur,$destinataire, $sujet, $text, $html=false, $cc='', $bcc='') { require_once 'include/swiftmailer/autoload.php'; //require_once 'include/swiftmailer/swiftmailer/lib/swift_init.php';