Loading module/Application/src/Application/Controller/IndicateurController.php +16 −3 Changes for module/Application/src/Application/Controller/IndicateurController.php: 16 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -245,7 +245,7 @@ class IndicateurController extends AbstractController //envoi une copie du mail à l'utilisateur si il l'a demandé $utilisateur = $this->getServiceContext()->getUtilisateur(); $emailUtilisateur[ $utilisateur->getEmail()] = $utilisateur->getDisplayName(); $mailer->sendCopyEmail($emailUtilisateur, $post); $mailer->sendCopyEmail($emailUtilisateur, $emails, $post); } $count = count($intervenants); $pluriel = $count > 1 ? 's' : ''; Loading Loading @@ -407,6 +407,18 @@ class IndicateurIntervenantsMailer { // corps au format HTML $html = $data['body']; if(!empty($data['emailsIntervenant'])) { $htmlLog = "<br/><br/>------------------------------------------------ <br/><br/>"; $htmlLog = "<p>Email envoyé au(x) destinataire(s) suivant(s) : <br/>"; foreach($data['emailsIntervenant'] as $email => $name) { $htmlLog .= $name . " / " . $email . "<br/>"; } $htmlLog .= "</p>"; $html .= $htmlLog; } $part = new MimePart($html); $part->type = Mime::TYPE_HTML; $part->charset = 'UTF-8'; Loading Loading @@ -465,11 +477,12 @@ class IndicateurIntervenantsMailer return $html; } public function sendCopyEmail($emails, $data) public function sendCopyEmail($emailsUtilisateur, $emailsIntervenant, $data, $logs = null) { $data['emailsIntervenant'] = $emailsIntervenant; $message = $this->createMessage($data); $message->setSubject('COPIE | ' . $data['subject']); foreach($emails as $email => $name) foreach($emailsUtilisateur as $email => $name) { $message->setTo($email, $name); } Loading module/Application/view/application/indicateur/envoi-mail-intervenants.phtml +1 −2 Changes for module/Application/view/application/indicateur/envoi-mail-intervenants.phtml: 1 added line, 2 removed lines. Original line number Diff line number Diff line Loading @@ -23,8 +23,7 @@ echo $this->form()->openTag($this->form->setAttribute('id', 'mail-form')); </div> <?= $this->formControlGroup($this->form->get('subject')->setLabel("Objet du mail")) ?> <?= $this->formControlGroup($this->form->get('body')->setLabel("Corps du mail")->setAttributes(['rows' => 15, 'id' => 'body'])) ?> <?= $this->formControlGroup($this->form->get('copy')->setLabel("Recevoir une copie de l'email envoyé")) ?> <?= $this->formControlGroup($this->form->get('copy')->setLabel("Recevoir une copie de l'email envoyé (incluant la liste des destinataires)")) ?> <?php if (!empty($sansMail)): ?> <div class="alert alert-warning"> Loading Loading
module/Application/src/Application/Controller/IndicateurController.php +16 −3 Changes for module/Application/src/Application/Controller/IndicateurController.php: 16 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -245,7 +245,7 @@ class IndicateurController extends AbstractController //envoi une copie du mail à l'utilisateur si il l'a demandé $utilisateur = $this->getServiceContext()->getUtilisateur(); $emailUtilisateur[ $utilisateur->getEmail()] = $utilisateur->getDisplayName(); $mailer->sendCopyEmail($emailUtilisateur, $post); $mailer->sendCopyEmail($emailUtilisateur, $emails, $post); } $count = count($intervenants); $pluriel = $count > 1 ? 's' : ''; Loading Loading @@ -407,6 +407,18 @@ class IndicateurIntervenantsMailer { // corps au format HTML $html = $data['body']; if(!empty($data['emailsIntervenant'])) { $htmlLog = "<br/><br/>------------------------------------------------ <br/><br/>"; $htmlLog = "<p>Email envoyé au(x) destinataire(s) suivant(s) : <br/>"; foreach($data['emailsIntervenant'] as $email => $name) { $htmlLog .= $name . " / " . $email . "<br/>"; } $htmlLog .= "</p>"; $html .= $htmlLog; } $part = new MimePart($html); $part->type = Mime::TYPE_HTML; $part->charset = 'UTF-8'; Loading Loading @@ -465,11 +477,12 @@ class IndicateurIntervenantsMailer return $html; } public function sendCopyEmail($emails, $data) public function sendCopyEmail($emailsUtilisateur, $emailsIntervenant, $data, $logs = null) { $data['emailsIntervenant'] = $emailsIntervenant; $message = $this->createMessage($data); $message->setSubject('COPIE | ' . $data['subject']); foreach($emails as $email => $name) foreach($emailsUtilisateur as $email => $name) { $message->setTo($email, $name); } Loading
module/Application/view/application/indicateur/envoi-mail-intervenants.phtml +1 −2 Changes for module/Application/view/application/indicateur/envoi-mail-intervenants.phtml: 1 added line, 2 removed lines. Original line number Diff line number Diff line Loading @@ -23,8 +23,7 @@ echo $this->form()->openTag($this->form->setAttribute('id', 'mail-form')); </div> <?= $this->formControlGroup($this->form->get('subject')->setLabel("Objet du mail")) ?> <?= $this->formControlGroup($this->form->get('body')->setLabel("Corps du mail")->setAttributes(['rows' => 15, 'id' => 'body'])) ?> <?= $this->formControlGroup($this->form->get('copy')->setLabel("Recevoir une copie de l'email envoyé")) ?> <?= $this->formControlGroup($this->form->get('copy')->setLabel("Recevoir une copie de l'email envoyé (incluant la liste des destinataires)")) ?> <?php if (!empty($sansMail)): ?> <div class="alert alert-warning"> Loading