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

Solving conversion of mails with Swiftmailer - The Second #38

Merged
merged 7 commits into from
Jun 12, 2023

Conversation

adrichel
Copy link
Contributor

@adrichel adrichel commented May 2, 2023

We had issues with exceptions preventing parsing of faulty msg files - and we are in need of an option to have a lossy conversion instead on no conversion in such cases. So here is a new PR as the initial one has been stale for a while.

I took the changes @risototh kindly provided in their PR (#24) and refactored it with changes @hfig suggested in their comment (#24 (comment)).

TLDR: you can now set a property to the Factory class to define if the exceptions in $message->toMime() method are being muted like this:

$messageFactory = new MAPI\MapiMessageFactory(new Swiftmailer\Factory(muteConversionExceptions: true));

@hfig
Copy link
Owner

hfig commented Jun 12, 2023

OK. Sure. I still don't like this conceptually but consumers are finding they routinely come across .eml files that seem to have had data ripped from them uncleanly, so I guess we do this.

@hfig hfig merged commit c18c878 into hfig:master Jun 12, 2023
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.

None yet

2 participants