mirror of
https://github.com/retailcrm/Fetch.git
synced 2025-04-04 05:43:35 +03:00
Merge pull request #96 from gpilla/master
Added check on Message::processAddressObject()
This commit is contained in:
commit
4adad3f685
1 changed files with 7 additions and 4 deletions
|
@ -623,10 +623,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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue