Loading src/UnicaenMail/Service/Mail/MailService.php +6 −5 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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()); Loading Loading @@ -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); Loading Loading
src/UnicaenMail/Service/Mail/MailService.php +6 −5 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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()); Loading Loading @@ -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); Loading