Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

IOException in EmailListener processing emails with blank body

SA-15803

Summary



Emails with Blank bodies seem to fail with error:

Error Messages

2015-10-14 07:01:23,487 INFO [stdout] (Dispatcher-Thread-93) 2015-10-14 07:01:23,484 [ EMAIL-Thread-3623] [ STANDARD] [ ] [App:01.10.01] ( services.email.EmailListener) ERROR EMAIL.Listener|from([email protected])|sub([ADD-] Rol)pega - Caught unexpected IOException. Will attempt to mark mail as 'seen'.
2015-10-14 07:01:23,487 INFO [stdout] (Dispatcher-Thread-93) java.io.IOException: No content
2015-10-14 07:01:23,487 INFO [stdout] (Dispatcher-Thread-93) at javax.mail.internet.MimePartDataSource.getInputStream(MimePartDataSource.java:115)
2015-10-14 07:01:23,487 INFO [stdout] (Dispatcher-Thread-93) at com.sun.mail.handlers.text_plain.getContent(text_plain.java:107)
2015-10-14 07:01:23,488 INFO [stdout] (Dispatcher-Thread-93) at javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:795)
2015-10-14 07:01:23,488 INFO [stdout] (Dispatcher-Thread-93) at javax.activation.DataHandler.getContent(DataHandler.java:542)
2015-10-14 07:01:23,488 INFO [stdout] (Dispatcher-Thread-93) at javax.mail.internet.MimeBodyPart.getContent(MimeBodyPart.java:657)
2015-10-14 07:01:23,488 INFO [stdout] (Dispatcher-Thread-93) at com.pega.pegarules.integration.engine.internal.services.email.EmailListener.getTextPartAsString(EmailListener.java:4897)
2015-10-14 07:01:23,488 INFO [stdout] (Dispatcher-Thread-93) at com.pega.pegarules.integration.engine.internal.services.email.EmailListener.readTextPart(EmailListener.java:5053)
2015-10-14 07:01:23,488 INFO [stdout] (Dispatcher-Thread-93) at com.pega.pegarules.integration.engine.internal.services.email.EmailListener.readRequestDataPart(EmailListener.java:4816)
...


Steps to Reproduce



Send plain text email with attachment to email listener - email will fail to import,


Root Cause



When the email is sent using text/plain content type and the body is not having any content then exception handling is missing. 

Resolution



Apply Hfix-24484. Changes to emaillistener.java in getTextPartAsString() to handle the scenario to handle exception.

 

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us