gmail4j icon indicating copy to clipboard operation
gmail4j copied to clipboard

Get message body

Open EyalEi opened this issue 12 years ago • 5 comments

I need to get the body of my messages, but message.getContentText() gives an error: java.lang.UnsupportedOperationException: This GmailMessage implementation does not provide getContentText()

I'm using version 0.5 snapshot, and instantiating an RssGmailClient. When trying an ImapGmailClient, as suggested in one of the issues here, the error is java.lang.NoClassDefFoundError: javax/mail/search/SearchTerm

EyalEi avatar Jan 26 '14 14:01 EyalEi

Can anyone please respond to any of the 3 issues I posted two days ago? If the API is unable to handle them I should know about it.

Thank you!

EyalEi avatar Jan 28 '14 14:01 EyalEi

@EyalEi - gmail4j is not actively maintained, there is no active community to give you quick response. I don't have time for that either - haven't been using gmail4j for years. What you can do is answer all the questions yourself - because it's open source and you can just read the code, build it yourself, and find out how everything works.

spajus avatar Jan 28 '14 14:01 spajus

Thanks for the reply, spajus. That's too bad, the API looks so nice.

Is there an API that does what I need? Can you recommend something?

Thanks again!

EyalEi avatar Jan 28 '14 15:01 EyalEi

You'll have to use the ImapGmailClient for that functionality. Unless you build the project from source the method you'll need to use to grab emails with is getUnreadEmails()

strusewych avatar Jan 28 '14 15:01 strusewych

I ended up using the standard javax.mail. It does everything I need.

EyalEi avatar Jan 29 '14 17:01 EyalEi