mirror of
https://github.com/retailcrm/Fetch.git
synced 2025-04-04 22:03:36 +03:00
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
This commit is contained in:
parent
501d5d0974
commit
37203c6697
1 changed files with 7 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue