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

+ Extend body parsing capabilities to match with imap_fetchstructure #12

Merged
merged 9 commits into from
Oct 24, 2022

Conversation

dicode-nl
Copy link
Contributor

I've extended the BodyStructure.php to be able to parse more different message types and match output with imap_fetchstructure. Tested with over 2000+ messages

@darkworks
Copy link

this is much needed , please merge it

@ProteanHub
Copy link

This code works beautifully and fixed the issues we were having with duplicated html body, and attachments not being assigned properly. Thank you!

@dicode-nl
Copy link
Contributor Author

@Orgoth can't this be fixed in a single statement like the rest of the base types

            if (is_scalar($item) && strtolower($item) == 'signed') {
                $subType = 'SIGNED';
                $section = 'parameters';
                continue;
            }

@dicode-nl
Copy link
Contributor Author

@Orgoth could you send me the json for fromBodyStructure so I can run it trough the parser?

@dicode-nl
Copy link
Contributor Author

Seems legit to me, pushed the changes to this PR.

@dicode-nl
Copy link
Contributor Author

@Orgoth how about this version, it is more in line with the original c-client parsing which is used by php_imap

@r954
Copy link

r954 commented Oct 19, 2022

@dicode-nl So far this is working as intended! Fixed a bunch of issues I was having. Great work!

@francescobianco francescobianco merged commit b7854f5 into javanile:main Oct 24, 2022
@francescobianco
Copy link
Member

Hi @dicode-nl ! I wanted to say hugely thank you for your work.
I have already integrated your work into the next release. I'm doing some testing but I'm sure it will be official.

Please consider supporting the users of this project by obviously charging a fee for your valuable work. Not to me but directly to those who ask for help.

Thanks too @Orgoth for the support of the project

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.

5 participants