Question

Email listener not starting when accessing sub folders in Inbox

Hi,

I am trying to access emails in sub folders of Inbox, example : INBOX/TEST

When i do the changes to the listener and try to start it through SMA, I get the below error. We are not getting this error if the email listener is configured to read directly from INBOX. Issue exists only when trying to access folders and subfolders other than INBOX.

Any idea what is causing this issue?

Start Listener Status
Listener 'Data-Admin-Connect-EmailListener:JPNCustomerServiceCA.Listener(com.pega.pegarules.integration.engine.internal.services.email.EmailListener)/0' failed to start because of the following error:
Failed to launch listener, com.pega.pegarules.pub.PRException: Email listener 'Listener.JPNCustomerServiceCA' failed to connect to Email Server - From: (B9337655B9E2A7ABE0D8E5D683F1D9F2B:(MBean Access))

Regards,

Vinay Meher

***Edited by Moderator: Pallavi to update platform capability tags***

Correct Answer
April 25, 2019 - 11:20pm

Hi Kranthi,

I have analysed the root cause and found that javax.mail.FolderNotFoundException: folder is not INBOX is caused when POP3 protocol is used.

The issue here is that the JavaMail API used within the POP3 connector doesn't support the use of mailboxFolder or moveToFolder. The mailbox folder name is hard coded to look at the default inbox on any email account for both reading and writing emails.
 

Thanks for your help, let me know if you have more information on this.

-Vinay Meher

Comments

Keep up to date on this post and subscribe to comments

Pega
April 25, 2019 - 5:26am

Hi,

can you please enable below loggers in ALL level and attach log file.

com.pega.pegarules.integration.engine.internal.services.listener.ServiceListenerBaseImpl

com.pega.pegarules.integration.engine.internal.util.PRServiceUtilsPriv

com.pega.pegarules.integration.engine.internal.services.listener.ListenerStateManagerImpl

com.pega.pegarules.integration.engine.external.services.listener.ListenerStateManager

com.pega.pegarules.integration.engine.internal.services.listener.ListenerWrapper

com.pega.pegarules.integration.engine.internal.services.listener.ListenerStateImpl.

 

Also Email Listener screenshot.

Thanks,

Kranthi

April 25, 2019 - 8:03am

Hi Kranthi,

Please find the attached log exception after enabling the mentioned loggers.

Regards,

Vinay Meher

Pega
April 25, 2019 - 9:28am
Response to puvvv4

Hi

We can see FolderNotFoundException in the logs.

com.ibm.ws.http.HttpConnection.run(HttpConnection.java:522)<CR><CR> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)<CR><CR>Caused by: javax.mail.FolderNotFoundException: folder is not INBOX<CR><CR> at com.sun.mail.pop3.POP3Folder.open(POP3Folder.java:203)<CR><CR> at com.pega.pegarules.integration.engine.internal.services.email.EmailListener.openMailFolder(EmailListener.java:3530)<CR><CR> at com.pega.pegarules.integration.engine.internal.services.email.EmailListener.setup(EmailListener.java:2134)<CR><CR> ... 61 more<CR><CR>]*

Could you please share the Email Listener screen shot.

Thanks

April 25, 2019 - 11:14pm

Hi Kranthi,

Please find the attached Listener screen shots.

Vinay Meher

April 25, 2019 - 11:20pm

Hi Kranthi,

I have analysed the root cause and found that javax.mail.FolderNotFoundException: folder is not INBOX is caused when POP3 protocol is used.

The issue here is that the JavaMail API used within the POP3 connector doesn't support the use of mailboxFolder or moveToFolder. The mailbox folder name is hard coded to look at the default inbox on any email account for both reading and writing emails.
 

Thanks for your help, let me know if you have more information on this.

-Vinay Meher