Retrieve the plain text content of an email message
In the following task, an exception may be thrown when you invoke the Transport.more() method.
Code sample: Retrieving the plain text content of an email message
private void readEmailBody(TextBodyPart tbp)
{
_plainTextMessage = (String)tbp.getContent();
if (tbp.hasMore() && !tbp.moreRequestSent())
{
try
{
Transport.more((BodyPart)tbp, true);
}
catch (Exception ex)
{
Dialog.alert("Exception: " + ex.toString());
}
}
}
Next topic: Retrieve the HTML content of an email message
Previous topic: Retrieve the plain text and HTML content in the body of an email message using a recursive method