php-imap icon indicating copy to clipboard operation
php-imap copied to clipboard

What is the fastest way to get one message?

Open ziggurad opened this issue 1 year ago • 0 comments

My code:

return $folder->query()->all()->limit(1)->get()->last();

I am currently processing emails from a mailbox with about 9 thousand messages. Connection via oAuth, The above code executes in about 1.6 seconds. Is it possible to download one message faster? It does not matter to me whether it will be the first, last or random message from the mailbox.

ziggurad avatar Aug 13 '24 21:08 ziggurad