Hello, great piece of work! but I have an issue :)
I use pop3 and have set a max of 20 messages (I have 60k which I don't want 'indexed'), so far it reads the latest 20 and all is fine, however when I delete the first one (inside another account) it detects this but it also sounds the new email sound because it reads message 21, which it doesn't know then...
ea.:
pop3 has 400 messages
poptrayu reads its set limit of 20 (unaware of message 21)
I delete message 1 (from another program)
poptrayu runs and detects there are 19 messages so it reads message 20
message 20 at this point in time is unknown to poptrayu so it tells me there is new mail
Of course there ain't no new mail, can you program something for this?
ea.
if pop3_count < NumNewestMsgToShow {
read pop3_messages (NumNewestMsgToShow - pop3_count);
if pop3_readasnew_date(pop3_messages) 'olderthen' 2-days then ignore as new mail;
}
if an email message coming in is 2 days old or older then basicaly it can't be new mail.
Or add the option NumNewestByUIDLMax = 100
this way anything between 1-100 is known locally.
Should the UIDL list get smaller due to deletions then read in until you have NumNewestByUIDLMax again
If there's a new UIDL but is in the range NumNewestByUIDLMax - NumNewestMsgToShow then mark UIDL as read
Or whatever you can come up with :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If your email account is compatible with IMAP (most are these days), I would suggest switching your account type from POP to IMAP. With IMAP, the read status of the message is tracked on the server. So if you've already read the additional messages that load when you delete a few, they will re-appear as read if they were already read and then that should prevent new email notification sounds from playing. "Remember viewed messages" option can try to replicate that behavior using local read/unread tracking, but I can't imagine it would perform quickly with 60k messages in your inbox.
I don't think it's technically correct to display "older" messages that have never been seen by poptray as read without some reason to believe they may have actually been read. It's possible that you just got so many new emails in a short timeframe that poptrayu can't load them all at once, and they are indeed unseen.
It is an interesting idea, however, to have an option to only play a notification sound if an unread message with a UID greater than the last known max UID is found in your inbox. I see the possible appeal of that. I will add that to my list of requested features to investigate the feasibility of.
I am also considering a couple other new features that may help with this situation, date based rules, and an option to display only mail that has arrived in the last N hours/days
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've started out with imap but it does not display all the folders only the root folder so I manually changed the ini file from imap to pop and got all the folders as pop3 but I had to impose a limit how much pop gets. I haven't tried the latest release yet, still on 5.0.15. On my phone I use k9 with imap and k9 can be set to read only the last 100 for each folder, with 40 folders thats not too bad if it needs to reload all of them over 4g (a full reload rarely happens anyway).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
adding option(s) to read folders other than INBOX for IMAP is on my todo list. Now that I've implemented the options for using server spam/trash/archive folders, it should not be that much more difficult to implement. The hard part is deciding what how the feature should work ;-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'd keep it simple, sort by foldername, foldername+date or just collective+date (the pop3 way). maybe add some group settings, ea. in k9 I've marked some folders part of second class group which don't get synchronized. have a look at its screen shots https://play.google.com/store/apps/details?id=com.fsck.k9 may give you ideas about features.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "General Forum" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hello, great piece of work! but I have an issue :)
I use pop3 and have set a max of 20 messages (I have 60k which I don't want 'indexed'), so far it reads the latest 20 and all is fine, however when I delete the first one (inside another account) it detects this but it also sounds the new email sound because it reads message 21, which it doesn't know then...
ea.:
pop3 has 400 messages
poptrayu reads its set limit of 20 (unaware of message 21)
I delete message 1 (from another program)
poptrayu runs and detects there are 19 messages so it reads message 20
message 20 at this point in time is unknown to poptrayu so it tells me there is new mail
Of course there ain't no new mail, can you program something for this?
ea.
if pop3_count < NumNewestMsgToShow {
read pop3_messages (NumNewestMsgToShow - pop3_count);
if pop3_readasnew_date(pop3_messages) 'olderthen' 2-days then ignore as new mail;
}
if an email message coming in is 2 days old or older then basicaly it can't be new mail.
Or add the option NumNewestByUIDLMax = 100
this way anything between 1-100 is known locally.
Should the UIDL list get smaller due to deletions then read in until you have NumNewestByUIDLMax again
If there's a new UIDL but is in the range NumNewestByUIDLMax - NumNewestMsgToShow then mark UIDL as read
Or whatever you can come up with :)
If your email account is compatible with IMAP (most are these days), I would suggest switching your account type from POP to IMAP. With IMAP, the read status of the message is tracked on the server. So if you've already read the additional messages that load when you delete a few, they will re-appear as read if they were already read and then that should prevent new email notification sounds from playing. "Remember viewed messages" option can try to replicate that behavior using local read/unread tracking, but I can't imagine it would perform quickly with 60k messages in your inbox.
I don't think it's technically correct to display "older" messages that have never been seen by poptray as read without some reason to believe they may have actually been read. It's possible that you just got so many new emails in a short timeframe that poptrayu can't load them all at once, and they are indeed unseen.
It is an interesting idea, however, to have an option to only play a notification sound if an unread message with a UID greater than the last known max UID is found in your inbox. I see the possible appeal of that. I will add that to my list of requested features to investigate the feasibility of.
I am also considering a couple other new features that may help with this situation, date based rules, and an option to display only mail that has arrived in the last N hours/days
I've started out with imap but it does not display all the folders only the root folder so I manually changed the ini file from imap to pop and got all the folders as pop3 but I had to impose a limit how much pop gets. I haven't tried the latest release yet, still on 5.0.15. On my phone I use k9 with imap and k9 can be set to read only the last 100 for each folder, with 40 folders thats not too bad if it needs to reload all of them over 4g (a full reload rarely happens anyway).
adding option(s) to read folders other than INBOX for IMAP is on my todo list. Now that I've implemented the options for using server spam/trash/archive folders, it should not be that much more difficult to implement. The hard part is deciding what how the feature should work ;-)
I'd keep it simple, sort by foldername, foldername+date or just collective+date (the pop3 way). maybe add some group settings, ea. in k9 I've marked some folders part of second class group which don't get synchronized. have a look at its screen shots https://play.google.com/store/apps/details?id=com.fsck.k9 may give you ideas about features.