File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -405,11 +405,17 @@ private function getMessageBody()
405405 $ this ->symfonyEmail
406406 ->from ($ this ->fromAddress ())
407407 ->to ($ this ->toAddress ())
408- ->cc ($ this ->returnCopies ($ this ->cc ))
409- ->bcc ($ this ->returnCopies ($ this ->bcc ))
410408 ->subject ($ this ->subject )
411409 ->html ($ this ->message )
412410 ->priority ($ this ->priority );
411+
412+ // Fixes the issue: "An address can be an instance of Address or a string ("null" given)."
413+ if (isset ($ this ->cc )){
414+ $ this ->symfonyEmail ->cc ($ this ->returnCopies ($ this ->cc ));
415+ }
416+ if (isset ($ this ->bcc )){
417+ $ this ->symfonyEmail ->bcc ($ this ->returnCopies ($ this ->bcc ));
418+ }
413419
414420 foreach ($ this ->attachments as $ file ) {
415421 $ this ->symfonyEmail ->attachFromPath ($ file );
You can’t perform that action at this time.
0 commit comments