Android Question POP3: how to check only new emails ?

juanjo3691

Member
Licensed User
Longtime User
Hello, when i check my emails i can see an email data with the POP_DownloadCompleted function. Into this function we can check the email with this code:

B4X:
    Dim m As Message
m = MailParser.ParseMail(Message, File.DirRootExternal)
Dim m_subjet As String = m.Subject

But where or how can i know if an email is new, it has not been open yet. ?

Thanks to all.
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
you need to remember the message-IDs for later.
Get the list, store the IDs.

Later check mail. Compare the list of mails with the stored IDs.
All mails with an unknown ID are new
 
Upvote 0

juanjo3691

Member
Licensed User
Longtime User
Thanks, DonManfred ... First i thought that when we read an email this information (an email has been read or not) is stored in the server.
I need to store this information locally.
Thanks.
:)
 
Upvote 0
Top