Click here to Skip to main content
15,890,690 members
Please Sign up or sign in to vote.
3.67/5 (2 votes)
In my asp.net website i integrate gmail account, my problem is that, when i read mail in gmail, then that mail status become read, and how to set status of that mail in my application as read??
And
how to get read and unread mails from gmail?
Posted
Updated 31-Jan-14 0:04am
v2
Comments
Show your progress and what library you are using.
rhl4569 31-Jan-14 6:13am    
currently it displays the all mails.i m using ImapClient for this.
Bojjaiah 31-Jan-14 6:39am    
Can you post your code? other wise maintain flags on your table. when user seen mark as read(flag=1) other wise mark as unread(flag=0). Note: flag means bool variable.

Refer - Message Flags[^].
Quote:
DELETED = r'\Deleted'
SEEN = r'\Seen'
ANSWERED = r'\Answered'
FLAGGED = r'\Flagged'
DRAFT = r'\Draft'
RECENT = r'\Recent' # This flag is read-only
I guess, you need to check whether message is flagged Recent or not.
 
Share this answer
 
v2
Comments
rhl4569 31-Jan-14 6:46am    
thank you sir.. i m fetching all mails from inbox. how to differentiate from that all read unread mails ?
Check - gmail_search(query, charset=None)[^].

It says...

query should be a valid Gmail search query string. For
example:

'has:attachment in:unread'
 
Share this answer
 
Comments
You have provided incorrect link. Check and update your answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900