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

Too big mail exception #511

Open
marcoberetta96 opened this issue Jun 30, 2021 · 1 comment
Open

Too big mail exception #511

marcoberetta96 opened this issue Jun 30, 2021 · 1 comment
Labels

Comments

@marcoberetta96
Copy link

Q A
ddeboer/imap version 1.10.0
PHP version 7.2.*

Hi,

I noticed an issue happening when fetching a big mail (more than 100 MB).
The mail can't be fetched and any method called on this mail causes the IMAP connection to be closed.
Even the getId method breaks the IMAP connection.

I tried to catch a generic Exception in order to allow the other messages to be fetched, but this does not solve the issue.
For all the other messages, the methods getRawHeaders() and getRawMessage() always return NULL.

I also tried to manually skip the first mail (the big one) by adding
$messageNumbers = array_slice($messageNumbers, 1);
in the constructor of MessageIterator and this solves the issue.
Big mail is skipped and the other mails are fetched correctly.

It would be nice if an exception like MailTooBigException is triggered when the problem arises, and the other mails could be fetched normally.

Thanks!

@Slamdunk
Copy link
Collaborator

Slamdunk commented Jul 6, 2021

You are right: if you find a way to do it, please ping me 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants