Hello all. I am here to share with you another of my apps.
Ever missed that doughnut in the kitchen? The one that your colleague advertised through a mass-email?
(Well you don’t have to from now)
JavaPushMail (JPM) is a mail notifier. It uses IMAP push command to give you instant notification of mail as soon as the mail has arrived in your mailbox.
Here is a list of features that it currently has:
- IMAP, IMAP+ support.
- Instant mail notification.
- Can be used on Mac OS X (10.6+), Linux and Windows
- Uses native system notification
- Growl
- Notify-OSD
- Tray Icon
- Fallback Notification – if everything else fails!
- Very simple and elegant User Interface.
- Open-source!
- Screenshots
Give it a try:
- Mac: JavaPushMail.app
- Windows: JavaPushMail.exe
- Platform-independent: JavaPushMail-1.0RC2
- Wanna have the source code: It’s on GitHub
Be wary, this is a Release Candidate 2. It may still have bugs. If so, please let me know so I can fix them!
Also, the project site is coming very soon.
Cheers,
Mo!

Hi,
Im try your API on a cyrus-imap server all it’s ok but i have a error after 30 minute
* BYE idle for too long
i see u just relaunch idle command after that but notification didn’t work after.
Have u any idea for help me ?
(sry for my bad english)
Hi Nicolas,
Thanks for the comment.
The problem with creating a mail (especially push) API is that it needs to be generic enough to work with ‘most’ clients and etc. However, depending on the server settings, the API may/may not work.
I’m pretty sure that there is nothing wrong with the notification API, but there is something wrong with actually receiving a notification from the server once IDLE is disconnected and reconnected.
Main issue is that debugging this is pretty damn difficult due to the fact that you cannot simulate the condition to understand whether it’s a server problem or a client/javax.mail problem.
I would say you need to run the app on a private mail server and look at the logs, and see whether the IDLE is ignored after reconnection or not? Since you aren’t getting notified by the server (which is from memory what goes wrong).
If you can get logs, email them to me, and I would be happy to play around with it.
Hope that helped,
Mo.
Hi,
Thx for your answer.
After many researchs i solved the problem
1: according to rfc 2177, it’s normal to be disconnected after 30 min. (just launch any command afeter 29mins)
2: after this exception, the “internal” MessageChangedListener and MessageCountListener are not reset on the folder because those are not null
So that the idle is working just once.
Just set it to null before recall setFolder() :
try { folder.idle(false);
} catch (FolderClosedException e) {
messageChangedListener = null;
messageCountListener = null;
usePush = true;
selectFolder("");
{...}
Thx for u help and u work !
Hi Nicolas,
Thanks for spotting the bug. I’ve mended the source on Github.
Here’s the link for you:
https://github.com/mofirouz/JavaPushMail/commit/a0de1797943aae233a64a0a6ffb0a91139163983
Thanks again
Hi Mo Firouz,
I am currently developing an email client for Android, but i am now stuck at instantly receiving IMAP messages. Somebody tried it with the Idle function, but he failed. Polling works fine right now.
Can you perhaps assist me and you will be payed for it ofcourse?
Looking forward to hearing from you.
Regards,
Hamid el Abassi
Hello Hamid,
I unfortunately don’t have any experience with emailing on Android.
If you are using ‘javax.mail’ or have general questions then I can most probably help you, otherwise (if you have android-specific queries then) I may not be the best person to advise you on problems.
Kindest regards,
Mo.