mirror of
https://github.com/retailcrm/Fetch.git
synced 2024-11-22 11:16:03 +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
@ -611,10 +611,13 @@ class Message
|
|||||||
$outputAddresses = array();
|
$outputAddresses = array();
|
||||||
if (is_array($addresses))
|
if (is_array($addresses))
|
||||||
foreach ($addresses as $address) {
|
foreach ($addresses as $address) {
|
||||||
|
if (property_exists($address, 'mailbox') && $address->mailbox != 'undisclosed-recipients') {
|
||||||
$currentAddress = array();
|
$currentAddress = array();
|
||||||
$currentAddress['address'] = $address->mailbox . '@' . $address->host;
|
$currentAddress['address'] = $address->mailbox . '@' . $address->host;
|
||||||
if (isset($address->personal))
|
if (isset($address->personal)) {
|
||||||
$currentAddress['name'] = $address->personal;
|
$currentAddress['name'] = $address->personal;
|
||||||
|
}
|
||||||
|
}
|
||||||
$outputAddresses[] = $currentAddress;
|
$outputAddresses[] = $currentAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user