IMAP Mail Checker

Forum for things that doesn't really have anything to do with hMailServer. Such as php.ini, beer, etc etc.
Post Reply
^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

IMAP Mail Checker

Post by ^DooM^ » 2006-08-26 22:20

Does anyone know of a small program that will keep a constant IMAP connection open to the email server and alert as soon as mail arrives?

Thunderbird does this but only when you have the inbox selected, otherwise it will check at whatever interval has been set.

I just want a small app that runs in the sys tray and as soon as mail arrives an alert is shown/heard?

Does anyone know if such a program exists?

Cheers!

Jon.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

User avatar
TheAngryPenguin
Senior user
Senior user
Posts: 341
Joined: 2004-10-11 20:51

Post by TheAngryPenguin » 2006-08-26 22:38

To check all IMAP folders in TB, add:

Code: Select all

user_pref("mail.check_all_imap_folders_for_new", true);
...to user.js -- more info here. As far as a "constant IMAP connection" is concerned, most IMAP clients will allow you to poll folders for new messages as frequently as every minute.

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Post by ^DooM^ » 2006-08-26 23:02

Thanks for that I will add that in a bit.

The issue is the 1 minute frequency. Heres the deal.

I have a home security system that runs on a separate dedicated server. All wireless stuff including motion sensors, door/window triggers and cameras. Now I can get my system to email me when an event is triggered. I basically want to trigger my lights to come on when I recieve this email (My lights turn on with a different program) so basically I want this to happen.

Event is triggered.
Email sent.
Email received.
Fire event to turn lights on.

Now 60 seconds is a long time to wait.

"Why don't you have the security program just run the exe instead of using the email" I hear you ask.
Thats the dumb thing. This program will only run its own things on events and the only way I can inform an outside executable that something is going on is via email. I know this is a crap way of doing things but its the only way available to me at the moment so 60 seconds is too long.

If I write a client to poll every second then that could work but I don't know how well hmail would handle that, polling every second of every day.

Any ideas?

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Post by ^DooM^ » 2006-08-26 23:07

Ok I have come up with a solution.

It was staring me in the face. Setup hmail on the security system. Send an email to the local copy and with a script in hmail fire the event when a mail comes in. it will be instant then. I'm such a noob :P

bazporter
Normal user
Normal user
Posts: 98
Joined: 2005-06-03 16:14

Post by bazporter » 2006-08-26 23:09

Just a thought, but why not get hMail to write the email out to a folder using a script and get your program that runs the lights to monitor that folder?

As soon a hMail receives the email it will appear in the folder and the lights turning on should be pretty much instant providing your program polls the folder every second or so. You could use WMI to do this.

This will remove the need for so much network traffic and load on the server.

--
Regards
Barry

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Post by ^DooM^ » 2006-08-26 23:34

hmail supports scripting in vb so can just have the hmail script fire the event when the email comes in :)

Thanks for your suggestion though :)

westdam
Senior user
Senior user
Posts: 728
Joined: 2006-08-01 21:24
Location: Padova, Italy
Contact:

Post by westdam » 2006-09-12 15:37

mmm and what about 4.3 and imap idle? Thunderbird support it as far as i know.. I just remember you have to do the modify suggested before to check all imap folder..

Post Reply