Click here to Skip to main content
11,790,880 members (60,991 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET email
Hello All,

I am working on a project where, I need to fetch mails from mail-server.
I got solution on Google stating that by using OpenPop.dll, this is possible. By using OpenPop.dll we will get all mails from mail-server, but every time connecting to server will get all mails.
for example if there are 100 mails it will get all 100 mails all the time, but I want to get only UNREAD mails.

My mail-server is of type POP, can anyone help me in getting only unread mails from mail-server.
Posted 14-Feb-13 1:54am
Sandeep Mewara at 14-Feb-13 8:30am
AFAIK, not possible.
salah9 at 14-Feb-13 8:34am
thnx for reply

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

POP cannot identify if a msg is read or unread.
Check the below link, guess its exactly what you need
POP Unread Mail[^]
salah9 at 14-Feb-13 8:27am
thnx for reply,
I already visited that page, and found that its long process.
I was looking something quick..

I hope i clear my point.
joe_j at 14-Feb-13 8:34am
Its not a long process, everything in green is commented out and is not required in the code.
salah9 at 15-Feb-13 2:36am
but like every time I fetch mails from server i will get all, then i need to differentiate it.
if we see IMAP, in that we can fetch only unread mails. is anything same in POP????
suggestions, advices are welcome...
thnx in advance
joe_j at 15-Feb-13 2:43am
Well as mentioned before POP doesnt have the capability to identify read or unread. If you have no other option than POP then your only way to go about it is to link a database to your app and keep updating all the UIDs of messages that already came in and only download the ones that do not have a UID in your database.
salah9 at 15-Feb-13 5:57am
thnks for your suggestion.
: )
joe_j at 15-Feb-13 6:40am
You'r welcome..I found out a link that can help you with aspect. Check it out
And if my answer was helpful, then please Accept it as a solution.
salah9 at 16-Feb-13 3:43am
thnx for the link,
i already visited it before.....
and i have no other option, rather than follow procedure what you adviced...

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

  Print Answers RSS
0 OriginalGriff 410
1 ppolymorphe 379
2 Richard MacCutchan 118
3 Maciej Los 70
4 George Swan 70
0 OriginalGriff 1,329
1 Maciej Los 835
2 ppolymorphe 780
3 KrunalRohit 686
4 CPallini 661

Advertise | Privacy | Mobile
Web01 | 2.8.1509028.1 | Last Updated 14 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100