mirror of
https://github.com/retailcrm/Fetch.git
synced 2025-04-08 11:32:02 +00:00
Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
|
8dcbff5d4c | ||
|
cd6af40196 | ||
|
521f7bcff7 | ||
|
bcaa835898 |
2 changed files with 11 additions and 3 deletions
|
@ -134,7 +134,9 @@ class Attachment
|
|||
$this->setFileName($parameters['name']);
|
||||
}
|
||||
|
||||
$this->size = $structure->bytes;
|
||||
if (property_exists($structure, 'bytes')) {
|
||||
$this->size = $structure->bytes;
|
||||
}
|
||||
|
||||
$this->mimeType = Message::typeIdToString($structure->type);
|
||||
|
||||
|
|
|
@ -253,7 +253,7 @@ class Message
|
|||
$this->subject = MIME::decode($messageOverview->subject, self::$charset);
|
||||
}
|
||||
|
||||
if (property_exists($messageOverview, 'date')) {
|
||||
if (property_exists($messageOverview, 'date') && null !== $messageOverview->date) {
|
||||
$this->date = strtotime($messageOverview->date);
|
||||
}
|
||||
|
||||
|
@ -764,7 +764,13 @@ class Message
|
|||
foreach ($addresses as $address) {
|
||||
if (property_exists($address, 'mailbox') && $address->mailbox != 'undisclosed-recipients') {
|
||||
$currentAddress = array();
|
||||
$currentAddress['address'] = $address->mailbox . '@' . $address->host;
|
||||
|
||||
$host = '';
|
||||
if (property_exists($address, 'host')) {
|
||||
$host = $address->host;
|
||||
}
|
||||
|
||||
$currentAddress['address'] = $address->mailbox . '@' . $host;
|
||||
if (isset($address->personal)) {
|
||||
$currentAddress['name'] = MIME::decode($address->personal, self::$charset);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue