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:
parent
28d70ef72a
commit
c94f8b9ba4
2 changed files with 13 additions and 0 deletions
|
@ -553,6 +553,18 @@ function gamuSend($slug, $options, $destinataires, $Tclient, $Tpdf, $Tfiles, $re
|
||||||
$args['corps'] = $corps;
|
$args['corps'] = $corps;
|
||||||
$args['sujet'] = $sujet;
|
$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 !
|
||||||
$envoyer_mail = charger_fonction('envoyer_mail', 'inc/');
|
$envoyer_mail = charger_fonction('envoyer_mail', 'inc/');
|
||||||
$ok = $envoyer_mail($destinataires, $sujet, $corps);
|
$ok = $envoyer_mail($destinataires, $sujet, $corps);
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
<pipeline nom="post_gamumail_ok" action='' />
|
<pipeline nom="post_gamumail_ok" action='' />
|
||||||
<pipeline nom="tpdf_charger_contexte" action='' />
|
<pipeline nom="tpdf_charger_contexte" action='' />
|
||||||
<pipeline nom="gamumail_filtrer_tPDF" action='' />
|
<pipeline nom="gamumail_filtrer_tPDF" action='' />
|
||||||
|
<pipeline nom="gamumail_pre_envoi" action='' />
|
||||||
|
|
||||||
<pipeline nom="autoriser" inclure="gamumail_autorisations.php" />
|
<pipeline nom="autoriser" inclure="gamumail_autorisations.php" />
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue