Same issue: what I expected to be of type Multipart is of type
ByteArrayInputStream...
public static String getText(Part message) throws
MessagingException, IOException {
Object content = message.getContent();
if (message.isMimeType("text/*")) {
return (String) content;
}
if (message != null && message.isMimeType("multipart/*")) {
if (!content instanceof Multipart) {
// *** This stream contains the non parsed multipart
version ! ***
// *** content instanceof ByteArrayInputStream ***
return "";
}
Multipart multipart = (Multipart) content;
for(int i = 0; i < multipart.getCount(); i++) {
Part part = multipart.getBodyPart(i);
String text = getText(part);
if (!"".equals(text)) {
return text;
}
}
}
return "";
}
Any hint?
On Oct 23, 9:29 pm, Kyle Roche <[email protected]> wrote:
> Same here. Started a few threads on it. No replies yet.
>
> Sent from my iPhone
>
> On Oct 23, 2009, at 11:04 AM, vs <[email protected]> wrote:
>
>
>
> > I'm having the same issue.... Can someone please help me with this?
>
> > On Oct 19, 12:44 pm, Prashant <[email protected]> wrote:
> >> yes, every thing is working fine except that I am not able to fetch
> >> message
> >> body in suitable format.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---