In this article, we will see the command to use in order to check unread messages of your Gmail account directly from the terminal.

Get Started

Launch the terminal and issue this command:

curl -u gmail-username --silent "https://mail.google.com/mail/feed/atom" | perl -ne 'print "\t" if //; print "$2\n" if /<(title|name)>(.*)<\/\1>/;'

Replace gmail-username with your own Gmail username, no need to write "@gmail.com".

You will be prompted to submit your Gmail account password. You will then get a list of all unread messages.

Post a Comment