tedivm/Fetch — pull request #43 by AdrianTP (2014-04-02 23:44:48+00:00)
Title: Issue with emails attached to an email

We're using Fetch to grab emails and process attachments. I sent an email from Outlook for Mac with two other emails (.eml files) attached to it, one of which had a .xlsx file attached to it. Fetch only returns the .xlsx file as an attachment of the main email, completely ignoring (or parsing through) the attached .eml files. Is this intentional behaviour?

Structure of the email I sent:
```
main email
.eml file
.eml file
.xlsx file
```
Structure of the data returned by ::getAttachments():
```
Array
(
[0] => Fetch\Attachment Object
(
[structure:protected] => stdClass Object
(
[type] => 3
[encoding] => 3
[ifsubtype] => 1
[subtype] => VND.OPENXMLFORMATS-OFFICEDOCUMENT.SPREADSHEETML.SHEET
[ifdescription] => 0
[ifid] => 0
[bytes] => 24576
[ifdisposition] => 1
[disposition] => attachment
[ifdparameters] => 1
[dparameters] => Array
(
[0] => stdClass Object
(
[attribute] => filename
[value] => document.xlsx
)

)

[ifparameters] => 1
[parameters] => Array
(
[0] => stdClass Object
(
[attribute] => name
[value] => document.xlsx
)

)

)

[messageId:protected] => 830
[imapStream:protected] => Resource id #43
[partId:protected] => 3.1.2
[filename:protected] => document.xlsx
[size:protected] => 24576
[data:protected] =>
[mimeType] => application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
[encoding] => 3
)

)
```
Am I just missing some configuration option or flag or something which will prevent this behaviour? I'm not able to ascertain just where in the code this manipulation/discarding of the attachments is occurring. Our intended use requires receiving unmodified attachments for processing and storage -- even .eml files (the contents of these .eml files, not their attachments, are what we're after, in most cases).