Mail fetching stops intermittently_IndexOutOfBoundsException

Mail fetching stops intermittently_IndexOutOfBoundsException

Error trace:

[com.adventnet.servicedesk.helpdesk.mail.task.MailFetchingTask]|[SEVERE]|[129]|: General Exception - Exception when trying to get messages. SO RETURNING...|java.lang.IndexOutOfBoundsException
at com.sun.mail.imap.IMAPFolder.checkRange(
at com.sun.mail.imap.IMAPFolder.getMessage(
at javax.mail.Folder.getMessages(


1. Servicedesk is trying to pull the mails from the mailbox as it has detected that there were some pending emails in the mailbox however, there seems to be another application that has fetched the mail before Servicedesk could fetch the mail.
2. Someone might have manually removed/moved such mails from the mailbox.


1. Under Admin >> Mail Server Settings, Stop fetching and start again. 
2. eset the mailbox username/password and update the new credentials under Admin--> Mail Server Settings so that only Servicedesk can log in to this mailbox.

Note: Update the password both in incoming and outgoing settings and restart the application to fix this issue.

It is always recommended to use a dedicated mailbox for Servicedesk Plus MSP.

                    New to ADSelfService Plus?

                      • Related Articles

                      • Email fetching stops intermittently

                        Error Trace  [17:36:08:969]|[07-05-2021]|[com.adventnet.servicedesk.kbase.util.AttachmentUtil]|[SEVERE]|[168]: exception occurred while writing to temporary attachment file | ...
                      • Mail fetching issue_Remote host closed connection during handshake

                        GUI Error Trace:  FAILURE :E-mail settings saved successfully. But error occurred while trying to check connection with mail server - Problem connecting to mailbox. LOG TRACE: [16:33:06:197]|[11-09-2018]|[SYSERR]|[INFO]|[120]: ...
                      • Monitor Mail Fetching schedule

                         We have a workaround for checking the status of mail fetching (start or stopped). However, we do not have an option to start or stop fetching remotely.  We can integrate "Applications Manager" with SDP MSP and we can do regular monitoring (as per ...
                      • Mail fetching - deleted flag issue

                        This message will be thrown, when you have provided a shared mailbox. The concept here is, SDP MSP reads the mail from the configured mailbox and adds it as a request. During the time, if some other application fetches the mail from the same mailbox ...
                      • OAuth Mail fetching Error

                        While trying to configure the mails during OAuth Configuration if you get the following error in the logs -> The request failed. The request failed. The remote ...