Getting Mail from Gmail into Java Application Using Imap

Accessing emails from gmail using IMAP ( javamail API)

Is one of the accounts using non-english UI by any chance?

Gmail folder names are localized with respect to the user localization settings.

Currently the only way to get the name of the localized folder is by using XLIST command.

Get only unseen mails from Gmail - imap

I found the solution.

Instead of

new FlagTerm(new Flags(Flags.Flag.RECENT), true)

I need to do this

new FlagTerm(new Flags(Flags.Flag.SEEN), false)

To get the unseen messages.

Accessing gmail via imap using Javamail (behind a proxy)

Behind the proxy doesn't stop you to connect to IMAP

There could be 2 reasons

  1. The IMAP port is block by your network administrator
  2. your IP is blocked/banned by Google

Thanks

Gmail IMAP Javamail search returns no messages where web does

I implemented a local cache. I initialize it at the beginning of the load test scenario, downloading the last days messages and capturing the last messages UID (using gmail imap plugin). Any time a session looks for an email it looks in the local cache. If it's not there it sets a flag so other sessions don't overlap caching and retrieves the newest messages.

Because it was intermittent, I wanted to give it a few days. It's run perfectly for the past 4 days. I could probably go one step better and set up a listener on the folder for new mail, but for now I'm satisfied that gmail was just returning 'success' but not doing the search after so many imap searches in succession.

Thanks to all for your feedback and suggestions!



Related Topics



Leave a reply



Submit