From 37203c6697dae5ef23d4b6010a89e4431a9d3599 Mon Sep 17 00:00:00 2001 From: Gustavo Pilla Date: Wed, 22 Oct 2014 19:30:19 -0300 Subject: [PATCH] Added check on Message::processAddressObject() Added check if the mail addresses are really a email address on Message::processAddressObject() The error is when the address is for example: undisclosed-recipients --- src/Fetch/Message.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Fetch/Message.php b/src/Fetch/Message.php index d5aef7a..23b6dde 100755 --- a/src/Fetch/Message.php +++ b/src/Fetch/Message.php @@ -611,10 +611,13 @@ class Message $outputAddresses = array(); if (is_array($addresses)) foreach ($addresses as $address) { - $currentAddress = array(); - $currentAddress['address'] = $address->mailbox . '@' . $address->host; - if (isset($address->personal)) - $currentAddress['name'] = $address->personal; + if (property_exists($address, 'mailbox') && $address->mailbox != 'undisclosed-recipients') { + $currentAddress = array(); + $currentAddress['address'] = $address->mailbox . '@' . $address->host; + if (isset($address->personal)) { + $currentAddress['name'] = $address->personal; + } + } $outputAddresses[] = $currentAddress; }