Skip to content

Fix .MSG files (MS Outlook Mail Exports) #11

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

Merged
merged 1 commit into from Aug 31, 2016
Merged

Fix .MSG files (MS Outlook Mail Exports) #11

merged 1 commit into from Aug 31, 2016

Conversation

WietseWind
Copy link
Contributor

.MSG files contain multipart data since they are raw dumps of an e-mail. Mail API's like mailgun will send corrupt .msg attachments when the attachment is using the default mimetype.

@Nyholm
Copy link
Member

Nyholm commented Aug 31, 2016

Thank you for this PR. I do not quite understand the problem. Lets discuss it in the issue first.

@WietseWind
Copy link
Contributor Author

This class is used by several E-mail API services/providers, like Mailgun.

An .msg file is an export of an e-mail (incl. headers, content, body, attachments, etc.) from MS Outlook in a strange binary format.

If there's no mimetype specified for .msg files, classes like the Mailgun class will handle the .msg file as a text file, resulting in a corrupted attachment.

Bottom line: by returning .msg = application/vnd.ms-outlook, classes like the Mailgun PHP class will send .msg attachments in the right way.

@WietseWind
Copy link
Contributor Author

WietseWind commented Aug 31, 2016

P.S.
Before fix:

After fix:

@Nyholm
Copy link
Member

Nyholm commented Aug 31, 2016

Okey, thank you for a detailed description.
Good work!

@Nyholm Nyholm merged commit 8a9b687 into php-http:master Aug 31, 2016
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

Successfully merging this pull request may close these issues.

2 participants