Solved Mention steps to debugging the IMAP is working or not?
specify steps to test the IMAP/mailbox is set up correctly or not
Open your project directory and locate path.
Open RefreshMailboxCommand.php and reach to the pushMessage() function.
Now check step by step by dumping each step while running the refresh mailbox command.
Here you can check $requestUrl if it is correct or not, and other parameter like $curlResponse.
Thanks for the detail information. I hope it will be helpful.
I hope in the future coding like that will be no more necessary as UVdesk will implement check directly in the UI.