Skip to content

Commit c836293

Browse files
authored
Merge pull request #288 from DeadZombie14/master
Laravel 10+: Fixes the issue: "An address can be an instance of Address or a strin…
2 parents 48653be + 6767087 commit c836293

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Traits/Replyable.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)