Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXCEL attachment #239

Open
nemcko16 opened this issue May 22, 2019 · 3 comments
Open

EXCEL attachment #239

nemcko16 opened this issue May 22, 2019 · 3 comments

Comments

@nemcko16
Copy link

nemcko16 commented May 22, 2019

Imap client do not show excel attachment. Can you help. Excel is not in TypeAttachments.php

@cbielich
Copy link
Contributor

cbielich commented Jul 11, 2019

I'm having the same issue but I have noticed that it is not just with excel but all of the office files (xls,xlsx,doc,docx,....)

I have edited the TypeAttachments.php file to include those attachments but that does not seem to do the trick.

Does anyone have an idea why this is happening?

@cbielich
Copy link
Contributor

Ok, I am getting somewhere on this, I would make changes to the code but I am not sure exactly why it works.

The issue so far that I have been able to come up with is that has to do with the sections of the email and where the attachments are placed.

In IncomingMessage.php you will see const SECTION_ATTACHMENTS = 1;

if I change it to const SECTION_ATTACHMENTS = 0; then I am able to receive all my attachments like excel and word docs where before I was not able to. What is weird is that leaving it as 1 does allow some attachments to come in but not all unless I change it to 0.

The only issue so far with changing it to 0 is that it will also produce some empty results (attachments) so I am stuck here so far. Still digging through the code but I am getting close.

@hokascha
Copy link

hokascha commented May 12, 2020

In TypeAttachments.php add the correct mime type to the $types array. For example, Powerpoint PPTX file has type "VND.OPENXMLFORMATS-OFFICEDOCUMENT.PRESENTATIONML.PRESENTATION", some more:

Excel (.xls): VND.MS-EXCEL
Excel (.xlsx): VND.OPENXMLFORMATS-OFFICEDOCUMENT.SPREADSHEETML.SHEET
Adobe Illustrator (.ai): ILLUSTRATOR

Using "MIXED" might give you empty attachments. I simply check for empty names in that case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants