Closed dokicro closed 1 year ago
@dokicro Did you get a chance to solve this?
We got a similar exception:
<< * 18 EXISTS
>> DONE
<< * 2 RECENT
>> DONE
<< TAG15 OK Idle completed (244.999 + 244.999 + 244.998 secs).
>> TAG16 IDLE
<< DONE BAD Error in IMAP command: Invalid command name (0.001 + 0.000 secs).
[2022-11-14 10:02:15] production.ERROR: idle failed {"exception":"[object] (Webklex\\PHPIMAP\\Exceptions\\RuntimeException(code: 0): idle failed at /var/www/html/vendor/webklex/php-imap/src/Connection/Protocols/ImapProtocol.php:1062)
I did but hacky way take a look at this: https://github.com/Webklex/laravel-imap/issues/453#issuecomment-1291856332 Everything was working fine with that workaround but then Gmail started hitting me with quota limits so I had to switch to https://github.com/dacastro4/laravel-gmail and have a corn job every minute pulling the data...
I'm using mailbox.org and I'll try out this solution: https://github.com/Webklex/php-imap/compare/master...apicore-engineering:php-imap:master
In our case the problem was that after the DONE and IDLE commands the package expects the + idling
or OK
responses and if a new email comes in the command will fail.
Example:
>> DONE
<< * 1 RECENT
<< TAG18 OK Idle completed (0.591 + 0.590 + 0.590 secs).
Describe the bug After 10-30minutes of running custom idle command per instructions (https://www.php-imap.com/frameworks/laravel/commands) I get the following error:
I am connected to Gmail business account
I played with debug mode and here is the output:
The problem could be that TAG5 came after TAG6 ?
Desktop / Server (please complete the following information):