From de108c0e86270bd5dfa3f5afbcb724d3b660900b Mon Sep 17 00:00:00 2001 From: Viacheslav Sychov Date: Fri, 15 Aug 2014 17:55:19 +0300 Subject: [PATCH] add attachment emails support --- src/Fetch/Message.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Fetch/Message.php b/src/Fetch/Message.php index 6a0b8c6..30fd247 100755 --- a/src/Fetch/Message.php +++ b/src/Fetch/Message.php @@ -444,7 +444,9 @@ class Message { $parameters = self::getParametersFromStructure($structure); - if (isset($parameters['name']) || isset($parameters['filename'])) { + if ((isset($parameters['name']) || isset($parameters['filename'])) + || (isset($structure->subtype) && strtolower($structure->subtype) == 'rfc822') + ) { $attachment = new Attachment($this, $structure, $partIdentifier); $this->attachments[] = $attachment; } elseif ($structure->type == 0 || $structure->type == 1) {