Commit 0d615dc3 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Possibilité de modifier manuellement l'expéditeur du mail des indicateurs (#50725)

parent 2ba12f65
Loading
Loading
Loading
Loading
+4 −1
Changes for module/Indicateur/src/Controller/IndicateurController.php: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -493,6 +493,7 @@ class IndicateurIntervenantsMailer
            $message = $this->createMessage($data);
            $message->setTo($email, $name);


            $this->controller->mail()->send($message);
        }
    }
@@ -519,9 +520,11 @@ class IndicateurIntervenantsMailer
        $body          = new MimeMessage();
        $body->addPart($part);

        $from = (isset($data['from'])) ? $data['from'] : $this->getFrom();

        return (new MailMessage())
            ->setEncoding('UTF-8')
            ->setFrom($this->getFrom(), "Contact Application " . ($app = $this->controller->appInfos()->getNom()))
            ->setFrom($from, "Contact Application " . ($app = $this->controller->appInfos()->getNom()))
            ->setSubject($data['subject'])
            ->setBody($body);
    }
+1 −1
Changes for module/Indicateur/view/indicateur/indicateur/envoi-mail-intervenants.phtml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ echo $this->form()->openTag($this->form->setAttribute('id', 'mail-form'));

<div class="row">
    <div class="col-md-8">
        <?= $this->formControlGroup($this->form->get('from')->setLabel("Expéditeur du mail")->setAttribute('disabled', 'disabled')) ?>
        <?= $this->formControlGroup($this->form->get('from')->setLabel("Expéditeur du mail")) ?>
    </div>
    <div class="col-md-4">
        <?= $this->formControlGroup($this->form->get('nombre')->setLabel("Nombre de mails à envoyer")->setAttribute('disabled', 'disabled')) ?>