-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add the ability to parse multipart MIME email strings #255
base: 2.26.x
Are you sure you want to change the base?
Commits on Nov 21, 2023
-
Add the ability to parse multipart MIME email strings
This change adds the ability to instantiate Message objects from multipart MIME email strings. Most of the functionality was already there; there was even a commented out stub that outlined the start of what was required. However, I think because the supporting functionality was lacking in laminas-mime, it was not implemented. Signed-off-by: Matthew Setter <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 89ca841 - Browse repository at this point
Copy the full SHA 89ca841View commit details
Commits on Nov 23, 2023
-
Update testCanParseMultipartEmail
This change adds assertions for the content of the various parts of message. The intention is to be able to check deeper into a multipart message to confirm that it is as expected. As the underlying test data contains a PDF file, it adds the smalot/pdfparser to simplify working with PDF files. Signed-off-by: Matthew Setter <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f2419f4 - Browse repository at this point
Copy the full SHA f2419f4View commit details
Commits on Nov 30, 2023
-
Refactor instantiation of mime messages
From my understanding of the various specs, primarily RFC 1341, the existing functionality for setting message headers was wrong. Given that, I've made this change, which should bring it into line with the spec, corrects issues with the existing tests, and sets one existing test as skipped (for the time being). Firstly, it removes the functionality that sets headers on the main message from message sub-parts. Secondly, equally as importantly, it sets the required headers, along with their defaults, based on the message's composition. I won't get into detail here, as it's documented in the code and in the updates to the documentation. Finally, the change also cleans up some of the existing functionality as well, setting return types, as they're supported in the package's allowed PHP versions. Signed-off-by: Matthew Setter <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c4da0a4 - Browse repository at this point
Copy the full SHA c4da0a4View commit details -
Update the documentation to reflect mime message composition changes
This commit updates the relevant sections of the documentation to reflect the changes in how mime messages are created. It also does a little bit of cleaning up of the documentation as well. Signed-off-by: Matthew Setter <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5bd5f72 - Browse repository at this point
Copy the full SHA 5bd5f72View commit details -
I think that I inadvertantly checked in a composer.lock file which referenced a local fork of laminas-mime that I was working on while patching the library. This change reverts that. Signed-off-by: Matthew Setter <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f283ac4 - Browse repository at this point
Copy the full SHA f283ac4View commit details -
After feedback from @MWOP, this change simplifies test data for testing the HTML part of an email. It removes SendGrid details, to ensure that the tests don't favour any given provider. Signed-off-by: Matthew Setter <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 927391a - Browse repository at this point
Copy the full SHA 927391aView commit details -
Add a series of iterators to simplify working with Message Parts
This change adds three custom RecursiveIterator classes with the aim of simplifying working with message parts. - PartsIterator simplifies iterating over a recursive list of parts, as multipart mime email parts can themselves contain parts. - MessagePartFilterIterator is designed to use PartsIterator to filter out parts that are not the contents of a message, such as the plain text or HTML body. - AttachmentPartFilterIterator is designed to use PartsIterator to filter out parts that are not message attachments. Together, these iterators will help provide functionality for quickly retrieving a message's content and attachments, without leaving it to the user. Signed-off-by: Matthew Setter <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 33f94d0 - Browse repository at this point
Copy the full SHA 33f94d0View commit details -
Add utility functions for retrieving message content and attachments
You can iterate over all of the message parts in the calling code and extract the plain text and HTML body, as well as the attachments. However, I thought that this would be something that people would do regularly; so much so such that adding utility functions for doing so might be a great productivity win for the package. The documentation's been updated to reflect these additions so that they're as visible as possible, and readily discoverable. Signed-off-by: Matthew Setter <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e7d10b0 - Browse repository at this point
Copy the full SHA e7d10b0View commit details
Commits on Dec 7, 2023
-
Merge branch '2.26.x' into add-multipart-support
Signed-off-by: Matthew Setter <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d4a1d4a - Browse repository at this point
Copy the full SHA d4a1d4aView commit details