Loading src/UnicaenMail/Service/Mail/MailService.php +5 −3 Original line number Diff line number Diff line Loading @@ -174,9 +174,6 @@ class MailService { */ public function sendMail($to, $subject, $texte, $attachement_path = null) : Mail { $message = (new Message())->setEncoding('UTF-8'); $message->setFrom($this->fromEmail, $this->fromName); if (!is_array($to)) $to = [$to]; /** @var Mail $mail */ Loading @@ -187,6 +184,7 @@ class MailService { if ($this->doNotSend) { $mail->setDestinatairesInitials(implode(",",$to)); $mail->setDestinataires(implode(",",$this->redirectTo)); $to = $this->redirectTo; } else { $mail->setDestinataires(implode(",",$to)); } Loading @@ -197,6 +195,10 @@ class MailService { if ($this->doNotSend) { $sujet .= ' {REDIR}'; } $message = (new Message())->setEncoding('UTF-8'); $message->setFrom($this->fromEmail, $this->fromName); $message->setTo( $to ); $message->setSubject($sujet); $texte = "<p><i>Ce courrier électronique vous a été adressé <strong>automatiquement</strong> par l'application ".$this->subjectPrefix.". </i></p>" . $texte; Loading Loading
src/UnicaenMail/Service/Mail/MailService.php +5 −3 Original line number Diff line number Diff line Loading @@ -174,9 +174,6 @@ class MailService { */ public function sendMail($to, $subject, $texte, $attachement_path = null) : Mail { $message = (new Message())->setEncoding('UTF-8'); $message->setFrom($this->fromEmail, $this->fromName); if (!is_array($to)) $to = [$to]; /** @var Mail $mail */ Loading @@ -187,6 +184,7 @@ class MailService { if ($this->doNotSend) { $mail->setDestinatairesInitials(implode(",",$to)); $mail->setDestinataires(implode(",",$this->redirectTo)); $to = $this->redirectTo; } else { $mail->setDestinataires(implode(",",$to)); } Loading @@ -197,6 +195,10 @@ class MailService { if ($this->doNotSend) { $sujet .= ' {REDIR}'; } $message = (new Message())->setEncoding('UTF-8'); $message->setFrom($this->fromEmail, $this->fromName); $message->setTo( $to ); $message->setSubject($sujet); $texte = "<p><i>Ce courrier électronique vous a été adressé <strong>automatiquement</strong> par l'application ".$this->subjectPrefix.". </i></p>" . $texte; Loading