--
You received this message because you are subscribed to the Google Groups "Gmail4j" group.
To post to this group, send email to gma...@googlegroups.com.
To unsubscribe from this group, send email to gmail4j+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gmail4j?hl=en.
Hello Rajiv Sir,
Sorry for late reply actually I was struggling
with some Maven settings.
I tried with the code you have provided above I check out the
source compile and run ImapGmailClientTest.java but still I was unable
to retrieve the text of the message.
According to observation I found
1 . javax.mail.internet.MimeMultipat type message are not being read
2 . Some simple message and HTML content message are read properly for
e.g.Mail sent by you was read properly
Please guide me If i have mistaken somewhere or How can i achieve reading ?
Regards
Ketan Barapatre
I am waiting for solution.
How to read message Content ?
Hope I will get some help this weekend.
Thank You
I have been waiting for mail content reading code.
If current stratus of API has any problem in reading contents.
Please let me know and Suggest me What to read to get it done . I will
develop that part to contribute in project.
Please let me know How can I contribute to this project?
Regards
Ketan Barapatre
private String geteDataFromMessage(org.apache.camel.Message message) {Object body = message.getBody();System.out.println(" body " + body);if (body instanceof String) {data = (String) body;return data;}if (body instanceof MimeMultipart) {try {MimeMultipart content = (MimeMultipart) body;for (int index = 0; index < content.getCount(); index++) {BodyPart part = content.getBodyPart(index);ContentType ct = new ContentType(part.getContentType());//System.out.println("Content-type: " + ct.getPrimaryType() + "/" + ct.getSubType());data = data + part.getContent();//System.out.println("Content" + part.getContent());}} catch (IOException ex) {Logger.getLogger(FilteredMessage.class.getName()).log(Level.SEVERE, null, ex);} catch (MessagingException ex) {Logger.getLogger(FilteredMessage.class.getName()).log(Level.SEVERE, null, ex);}}return data;}
--
You received this message because you are subscribed to the Google Groups "Gmail4j" group.
To view this discussion on the web visit https://groups.google.com/d/msg/gmail4j/-/VyVkrW8-dAAJ.
To post to this group, send email to gma...@googlegroups.com.
To unsubscribe from this group, send email to gmail4j+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gmail4j?hl=en.
If it doesnt work. Plz let me know. We can share idea and develop it.
Thank you
Ketan