fix(notifmail): no id_fiche tests and session title in mail

This commit is contained in:
Florian Schmitt 2024-04-12 19:00:56 +03:00
parent c76a64684f
commit 6b31909bb1

View file

@ -25,7 +25,6 @@ class NotifMailField extends BazarField
}
public function formatValuesBeforeSave($entry)
{
if (empty($entry['id_fiche'])) { // que pour la premiere saisie de la fiche
$session = '';
$session_employeur = false;
if (!empty($entry['listefiche2inscription'])) {
@ -59,11 +58,10 @@ SCOP Wision
$message_html = nl2br($message);
include_once 'tools/contact/libs/contact.functions.php';
if (!empty($entry['bf_mail'])) {
send_mail('noreply@yeswiki.pro', 'Adultes Relais', $entry['bf_mail'], '[Adultes Relais] Confirmation de l\'inscription de ' . $entry['bf_prenom'] . ' ' . $entry['bf_nom'] . ' à ' . $date, $message, $message_html);
send_mail('noreply@yeswiki.pro', 'Adultes Relais', $entry['bf_mail'], '[Adultes Relais] Confirmation de l\'inscription de ' . $entry['bf_prenom'] . ' ' . $entry['bf_nom'] . ' à ' . $s['bf_titre'], $message, $message_html);
}
if (!empty($entry['bf_contact_administratif_tel_mail'])) {
send_mail('noreply@yeswiki.pro', 'Adultes Relais', $entry['bf_contact_administratif_tel_mail'], '[Adultes Relais] Confirmation de l\'inscription de ' . $entry['bf_prenom'] . ' ' . $entry['bf_nom'] . ' à ' . $date, $message, $message_html);
}
send_mail('noreply@yeswiki.pro', 'Adultes Relais', $entry['bf_contact_administratif_tel_mail'], '[Adultes Relais] Confirmation de l\'inscription de ' . $entry['bf_prenom'] . ' ' . $entry['bf_nom'] . ' à ' . $s['bf_titre'], $message, $message_html);
}
}