feat: ajout pipeline gamumail_pre_envoi qui permet de modifier tous les champs du mail juste avant l'envoi

cela permet d'ajouter par exemple un email en cc
This commit is contained in:
Christophe 2025-04-14 21:56:31 +02:00
parent 28d70ef72a
commit c94f8b9ba4
2 changed files with 13 additions and 0 deletions

View file

@ -553,6 +553,18 @@ function gamuSend($slug, $options, $destinataires, $Tclient, $Tpdf, $Tfiles, $re
$args['corps'] = $corps;
$args['sujet'] = $sujet;
[$destinataires, $sujet, $corps] = array_values(pipeline('gamumail_pre_envoi', [
'args' => [
'slug' => $slug,
'options' => $options
],
'data' => [
'destinataires' => $destinataires,
'sujet' => $sujet,
'corps' => $corps,
]
]));
// envoyer !
$envoyer_mail = charger_fonction('envoyer_mail', 'inc/');
$ok = $envoyer_mail($destinataires, $sujet, $corps);

View file

@ -24,6 +24,7 @@
<pipeline nom="post_gamumail_ok" action='' />
<pipeline nom="tpdf_charger_contexte" action='' />
<pipeline nom="gamumail_filtrer_tPDF" action='' />
<pipeline nom="gamumail_pre_envoi" action='' />
<pipeline nom="autoriser" inclure="gamumail_autorisations.php" />