How to troubleshoot Get IMAP Mail Message when it freezes


How can I troubleshoot the Get Imap Mail Message activity? I have created a robot and deployed it to an unattended robot with a trigger for every 15 minutes. Every now and then I notice the unattended robot is stuck on the Get Imap Mail Message. There’s no error at all. It just stays at that activity. The longest it has been stuck has been 48 hours before I noticed. It doesn’t freeze every time it runs and it runs perfectly when I try manually in debug mode. How can I get additional logging on what it’s trying to do when it freezes? I have already added a Log file just before and immediately after the activity.

I’m trying to connect to an O365 account (