Sep 9, 2009

Check mails in Gmail from command line

If you want to check new mails on your Gmail account from the command line, here is the how to:
curl -u username --silent "https://mail.google.com/mail/feed/atom" | perl -ne 'print "\t" if //; print "$2\n" if /<(title|name)>(.*)<\/\1>/;'
You will be prompted for a password before the informations are gathered. Please notice that you need to change username to your Gmail user name before executing.

No comments: