-   Linux - Software (
-   -   Script to get number of unread messages in gmail (

Geneset 10-13-2008 01:44 PM

Script to get number of unread messages in gmail
Afternoon gents, I've got myself another project.

But I'm trying to find a method of getting just the unread messages from a google mail account.

Any ideas?

Geneset 10-13-2008 03:39 PM

I tried with a perl module called WWW::Scraper::Gmail but something is screwy

WWW::Scraper::Gmail::countMail() just returns 0 when there are messages or 0 when there arnt. I'm assuming this is deprecated but i would have liked a more customisable interface.

Nobody else got any ideas?

Tobler 10-13-2008 03:54 PM

How about IMAP protocol in Gmail and fetchmail on your Linux?

poll with proto imap and options no dns
user "" there is your-linux-account here options ssl keep pass your-gmail-password

Check mail without downloading and verbose option on:
fetchmail -c -v

br, Tobler

Geneset 10-13-2008 04:04 PM

I know, i was thinking that too, but i mean, thats really messy and inelegant :D

With perls extensability, web handling and xml processing, I'd hav thought that it would be a breeze. Guess not.
Thank you for your contribution.
Any other ideas?

All times are GMT -5. The time now is 12:17 AM.