diff --git a/src/Message.php b/src/Message.php index eb072df7..ab9c01e7 100644 --- a/src/Message.php +++ b/src/Message.php @@ -314,6 +314,10 @@ public function setSender($emailOrAddress, $name = null) */ public function getSender() { + $headers = $this->getHeaders(); + if (!$headers->has('sender')) { + return null; + } $header = $this->getHeaderByName('sender', __NAMESPACE__ . '\Header\Sender'); return $header->getAddress(); }