Closed Waiker closed 2 years ago
Hi @Waiker ,
thanks for the detailed question. The MessageNewEvent
only gets dispatched if a new message got fetched.
It looks to me as if you aren't fetching any messages.
If you want to continuously watch for new messages, checkout the IDLE
command: https://www.php-imap.com/frameworks/laravel/commands
I hope this helps :)
Best regards & happy coding,
Thank you. I will use the command
Thanks for your project! I need to perform some actions when a new message arrives.
In /app/Providers/EventServiceProvider.php file I added a MessageNewEvent according to your documentation and added a NewEmailNotification::class listener to it, but nothing happens when a new message arrives in the mailbox.
EventServiceProvider.php
NewEmailNotification::class
p/s the test code from the page successfully connects to mail and reads all messages.