Regarding content type
1 posts in topic
Flat View  Flat View

Posted By:   satish_varma
Posted On:   Friday, July 18, 2003 12:25 AM

Hi i am using java mail api to read pop3 mails .
when the mail content type is text/plain it is working fine
i mean displaying body of the mail but if the mail format is other than text/plain it is showing javax.mail.internet.MimeMultipart@eb017e in place of body of the mail. How can i convert it to string.

Re: Regarding content type

Posted By:   Anil_Hemnani  
Posted On:   Tuesday, August 5, 2003 03:19 AM

Check the content type of the mail by calling method getContentType(). In case if its multipart message then getContent() will return object of Mime Multipart. Type cast and use it.
Most common content types are "multipart/mixed", "multipart/alternative", "multipart/related", "message/rfc822" and more. Different contents are to be handled in different way.
About | Sitemap | Contact