-
-
Notifications
You must be signed in to change notification settings - Fork 182
Description
Is your feature request related to a problem? Please describe.
I have written an email forwarder, which reads the incoming messages from a catch-all mailbox using php-imap
. I am generally very happy with it, but when people send email with large attachments, I see errors like these:
[...] Uncaught Exception Symfony\Component\ErrorHandler\Error\OutOfMemoryError: "Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 9282368 bytes)" at [...]/vendor/webklex/php-imap/src/Part.php line 196
Describe the solution you'd like
It would be nice, if php-imap
would not load the whole Part
content to memory, but instead, e.g. write the raw message to a temp file, and only reference parts by offset within that file (or similar)
Describe alternatives you've considered
None so far, but I am very open to other solutions, to the problem!
Additional context
I would like to contribute a PR, once we know how to solve the problem.