hsinxh
hsinxh

Reputation: 1883

fetch user's unread mails from Gmail

I want to fetch unread mails from user's gmail account and send the notification via SMS. I have complete setup for sending SMS. I just need to know how can I fetch unread mails from Gmail, is there any API for this ? what tools I need ?

Upvotes: 1

Views: 974

Answers (5)

Muhammad Zeeshan
Muhammad Zeeshan

Reputation: 8856

This Gmail rss feed with unread email in PHP can help you.

Upvotes: 1

Haim Evgi
Haim Evgi

Reputation: 125486

I hope its help you to start, great link about Check your unread Gmail from the command line

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

i tried it before some months and its work fine!

Upvotes: 1

Mario The Spoon
Mario The Spoon

Reputation: 4859

or check google code if they provide an api for checking the unread messages of a user

Upvotes: 1

jman
jman

Reputation: 11606

Use php:imap (http://www.php.net/imap) and do a search for UNSEEN messages.

Upvotes: 1

Soren
Soren

Reputation: 14688

I would just pull from the Imap4 or pop3 interface provided by Gmail.

However the user will have to have Imap/Pop3 enabled but I assume that is not a problem.

I assume you will be able to find clients for PHP for either of the two

Upvotes: 1

Related Questions