Commit 010faccf authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Fix envoi multiple (avec la syntax ...)

parent 7ccff60b
Loading
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -194,7 +194,8 @@ class MailService {
            ->subject($sujet)
            ->text(strip_tags($corps))
            ->html($corps);
        foreach ($to as $t) $message->to($t);
        $message->to(...$to);


        $attachments = ($mail->getAttachmentPaths())?explode("#<>#",$mail->getAttachmentPaths()):[];
        foreach ($attachments as $path) {
@@ -204,9 +205,7 @@ class MailService {
        }

        if (!$redirect) {
            foreach ($co as $c) {
                if ($c !== null AND $c !== '') {$message->cc($c);}
            }
            if ($co !== null and !empty($co)) $message->cc(...$co);
        }

        //if ($mail->getCopies()) $message = $message->bcc($mail->getCopies());
@@ -257,6 +256,8 @@ class MailService {
        {
            try {
                $email = $this->transform($mail, $module);
                $adresses = $email->getTo();
                $adresse = $email->getFrom();
                $this->getMailer()->send($email);
            } catch (TransportExceptionInterface $e) {
                throw new RuntimeException("Échec de l'envoi du message", 0, $e);