Skip to content

Commit fd55c1f

Browse files
committed
Merge branch 'master' of https://github.com/Webklex/laravel-imap
2 parents e33d7de + 65eabd0 commit fd55c1f

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
1414
### Affected Classes
1515
- NaN
1616

17+
## [1.0.4.2] - 2018-03-15
18+
### Added
19+
- Support message delivery status [#47](https://github.com/Webklex/laravel-imap/pull/47)
20+
21+
### Affected Classes
22+
- [Message::class](src/IMAP/Message.php)
23+
1724
## [1.0.4.1] - 2018-02-14
1825
### Added
1926
- Enable support to get In-Reply-To property from Message header. [#56](https://github.com/Webklex/laravel-imap/pull/56)

src/IMAP/Message.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,9 @@ private function fetchStructure($structure, $partNumber = null) {
431431
*/
432432
protected function fetchAttachment($structure, $partNumber){
433433
switch ($structure->type) {
434+
case self::TYPE_MESSAGE:
435+
$type = 'message';
436+
break;
434437
case self::TYPE_APPLICATION:
435438
$type = 'application';
436439
break;
@@ -476,6 +479,13 @@ protected function fetchAttachment($structure, $partNumber){
476479
}
477480
}
478481
}
482+
if(self::TYPE_MESSAGE == $structure->type) {
483+
if($structure->ifdescription) {
484+
$attachment->name = $structure->description;
485+
} else {
486+
$attachment->name = $structure->subtype;
487+
}
488+
}
479489

480490
if (!$attachment->name && property_exists($structure, 'parameters')) {
481491
foreach ($structure->parameters as $parameter) {

0 commit comments

Comments
 (0)