I think this is a bug in app engine - it doesn't seem to be following the
standard. I've blogged the solution here:
http://jeremyblythe.blogspot.com/2009/11/receiving-email-in-google-app-engine.html

J.

On Mon, Nov 30, 2009 at 2:34 PM, Peter Ondruska <peter.ondru...@gmail.com>wrote:

> I am following instructions on
> http://code.google.com/appengine/docs/java/mail/receiving.html
> to process incoming mail but failing on retrieving content (headers
> are fine).
>
> "The getContent() method returns an object that implements the
> Multipart interface. You can then call getCount() to determine the
> number of parts and getBodyPart(int index) to return a particular body
> part."
>
> MimeMultipart mmp = (MimeMultipart) message.getContent();
>
> Error:
> java.lang.ClassCastException: java.io.ByteArrayInputStream cannot be
> cast to javax.mail.internet.MimeMultipart
>
> And when I check at runtime what class is returned by getContent() it
> really is java.io.ByteArrayInputStream.
>
> Am I doing something wrong?
>
> --
>
> 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
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>
>

--

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 google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.


Reply via email to