Get message body
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
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 - 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.
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!
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()
I ended up using the standard javax.mail. It does everything I need.