Merge pull request #96 from gpilla/master

Added check on Message::processAddressObject()
This commit is contained in:
Robert Hafner 2015-02-05 23:29:37 -08:00
commit 4adad3f685

View File

@ -623,10 +623,13 @@ class Message
$outputAddresses = array(); $outputAddresses = array();
if (is_array($addresses)) if (is_array($addresses))
foreach ($addresses as $address) { foreach ($addresses as $address) {
$currentAddress = array(); if (property_exists($address, 'mailbox') && $address->mailbox != 'undisclosed-recipients') {
$currentAddress['address'] = $address->mailbox . '@' . $address->host; $currentAddress = array();
if (isset($address->personal)) $currentAddress['address'] = $address->mailbox . '@' . $address->host;
$currentAddress['name'] = $address->personal; if (isset($address->personal)) {
$currentAddress['name'] = $address->personal;
}
}
$outputAddresses[] = $currentAddress; $outputAddresses[] = $currentAddress;
} }