I have read that I can use the gmail atom feed to get mails from "inbuilt" labels created by google.
But when I try to get mails from the "read" label, using https://mail.google.com/mail/feed/atom/read I get zero emails returned.
The same works if I use label:"read" in the search box.
Any idea if my usage of the atom feed is correct or wrong?
Your problem could be related with this:
Please keep in mind that Gmail messages will appear in your aggregator only if there are unread messages in your inbox.
Source: http://code.google.com/apis/gmail/docs/inbox_feed.html
I've been doing some work with this today, and while the accepted answer IS TRUE, there's a little bit that's been left out.
The way the feed works with respect to labels, is that to use labels, you have to assign emails to that label group.
So for example, in my GMail I have a filter that marks ALL my emails from code project as having the label 'Codeproject'
I then use:
to get ONLY the unread messages in that folder.
I also have other filters such as 'Community' , 'Family' & 'Business' and as with above I have filters that categorize these by adding labels to them.
As soon as unread notifications appear in any of those labels I can pick them up using
- https://mail.google.com/mail/feed/atom/Community
- https://mail.google.com/mail/feed/atom/Family
- https://mail.google.com/mail/feed/atom/Business
As the accepted answer states though, if there's none unread, then nothing will be returned.
来源:https://stackoverflow.com/questions/6467432/how-to-use-gmail-atom-feed-to-read-gmail-labels