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:
Gustavo Pilla 2014-10-22 19:30:19 -03:00
parent 501d5d0974
commit 37203c6697

View File

@ -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;
}