- $log->dbug("MonitorMail: Connection to $opts{imap} ended - lasted "
- . howlong $startTime);
-
- # Destroy current IMAP connection
- $log->dbug("MonitorMail: Destroying IMAP connection to $opts{imap}");
-
- undef $IMAP;
-
- # Re-establish connection
- Connect2IMAP;
-
- $log->dbug("MonitorMail: Reconnected to IMAP server $opts{imap}");
-
- # MonitorMail again - the dreaded goto! Seems the cleanest way to restart
- # in this instance. I could call MonitorMail() recursively but that would
- # leave junk on the stack.
- $log->dbug('MonitorMail: Going back to the top of the loop');