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



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] ( 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) No content
2015-10-14 07:01:23,487 INFO [stdout] (Dispatcher-Thread-93) at javax.mail.internet.MimePartDataSource.getInputStream(
2015-10-14 07:01:23,487 INFO [stdout] (Dispatcher-Thread-93) at com.sun.mail.handlers.text_plain.getContent(
2015-10-14 07:01:23,488 INFO [stdout] (Dispatcher-Thread-93) at javax.activation.DataSourceDataContentHandler.getContent(
2015-10-14 07:01:23,488 INFO [stdout] (Dispatcher-Thread-93) at javax.activation.DataHandler.getContent(
2015-10-14 07:01:23,488 INFO [stdout] (Dispatcher-Thread-93) at javax.mail.internet.MimeBodyPart.getContent(
2015-10-14 07:01:23,488 INFO [stdout] (Dispatcher-Thread-93) at
2015-10-14 07:01:23,488 INFO [stdout] (Dispatcher-Thread-93) at
2015-10-14 07:01:23,488 INFO [stdout] (Dispatcher-Thread-93) at

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. 


Apply Hfix-24484. Changes to 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