diff options
Diffstat (limited to 'lib/private/Mail/Message.php')
-rw-r--r-- | lib/private/Mail/Message.php | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/private/Mail/Message.php b/lib/private/Mail/Message.php index 4ea9da532b6..9437bd0216f 100644 --- a/lib/private/Mail/Message.php +++ b/lib/private/Mail/Message.php @@ -11,6 +11,7 @@ declare(strict_types=1); * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> + * @author Arne Hamann <github@arne.email> * * @license AGPL-3.0 * @@ -112,7 +113,7 @@ class Message implements IMessage { * @return array */ public function getFrom(): array { - return $this->swiftMessage->getFrom(); + return $this->swiftMessage->getFrom() ?? []; } /** @@ -156,7 +157,7 @@ class Message implements IMessage { * @return array */ public function getTo(): array { - return $this->swiftMessage->getTo(); + return $this->swiftMessage->getTo() ?? []; } /** @@ -178,7 +179,7 @@ class Message implements IMessage { * @return array */ public function getCc(): array { - return $this->swiftMessage->getCc(); + return $this->swiftMessage->getCc() ?? []; } /** @@ -200,7 +201,7 @@ class Message implements IMessage { * @return array */ public function getBcc(): array { - return $this->swiftMessage->getBcc(); + return $this->swiftMessage->getBcc() ?? []; } /** @@ -258,6 +259,14 @@ class Message implements IMessage { /** * Get's the underlying SwiftMessage + * @param Swift_Message $swiftMessage + */ + public function setSwiftMessage(Swift_Message $swiftMessage): void { + $this->swiftMessage = $swiftMessage; + } + + /** + * Get's the underlying SwiftMessage * @return Swift_Message */ public function getSwiftMessage(): Swift_Message { |