Hardening of POP3 and SMTP communication:
SMTP: Decrement failure counter when no possible message send
occurred. This way, K-9 will only stop attempting to send messages
for which a possible successful send occurred, but K-9 could not
detect. Any message that is known to have completely failed to send
will be reattempted indefinitely.
POP3: Some reworking of Exception handling. Also, if it is not
possible to get a "message number" for the UID of the message that is
being deleted, conclude that the message has already been deleted on
the server. Mark this as a permanent error, so that it gets removed
from the pending actions queue.
MessagingController: Look for the permanentFailure flag on the
MessagingException, and if a pending action raised a permanent
failure, remove the pending action from the queue so that it will not
be re-attempted nor block later requests.
Significant hardening of the email sending process.
A given message in the Outbox is only attempted to be sent 5 times.
Once the threshold is reached, the message is flagged. asses through
the Outbox skip flagged messages. The message can be tried again by
manually unflagging. When any messages are flagged during a pass
through the Outbox, K-9 raises a notification with a fast flashing red
LED, alerting the user to the failure to send. A note is also placed
in the K9mail-errors.
The read timeout on SMTP connections has been changed to 300000ms (5
minutes)
The send attempt counter is kept in memory, not stored with the
message, so a phone or application restart will clear the counters,
but not the flagged state. As the intent of this revision is to avoid
runaway message sending, this is deemed to be acceptable for now.
The moving of messages from the Outbox to the Sent folder has been
changed to an atomic move.
Extra error checking has been added to the SMTP communication code.
The flashing LED may be excessive.
Provide preference for which folder is automatically expanded when
entering the Folder/Message list.
Can be set to -NONE-, so that no folder is automatically expanded.
Defaults to Inbox, which is like the default behavior of the core
Android Email.
Fails to move the automatically opened folder to the top of the
screen. This needs more work.
The already selected folder should be highlighted (or otherwise
indicated) in the ChooseFolder Activity. This needs more work.
Accounts: Option menu->Check mail = check mail in all
folders of all accounts
Accounts: Context (long-press on account) menu->Check mail = check mail
in all folders of this account
Folder/Message List: Option menu->Check mail = check mail in all
folders of this account
Folder/Message List: Contet (long-press on folder) menu->Check mail = check mail in this
folder*
*All "Check mail" options, except for the long-press on an individual
folder, respect the normal synchronization class settings.
Eliminate all Refresh menu items.
Add progress indicators to Accounts activity. Indeterminite progress
indicator while email checking is in progress. Determinite progress
indicator while fetching unread counts.
dumbfile on Feb 28, 2009.
One change of my own, putting the actual folders name outside the
parentheses, and the functional/special name inside the parentheses.
Copy now copied body (but attachments might not work right).
Move is now reliable (needed to open the destination folder), and
leaves a placeHolder message behind in the source folder so that
messages are not resynced.
3.
Each remote Store (IMAP, POP3, WebDAV) can provide indications to the
higher level classes as to whether copy and move are implemented.
Currently, copy and move are only provided by ImapStore.java. When
the facilities are not available, the user interface suppresses the
menu options.
The available destination folders can be configured using folder
classes.
Copy results in null message bodies in the destination copy of the
message until the next sync. This is a problem that occurred with
deletes previously, and is likely a fault with the copyMessages method
of LocalStore.java.
Utilizes a modified version of the ChooseFolder.java Activity that
debuachedsloth contributed in a patch attached to Issue 285 on 16 Feb
2008.
All messages in all folders that were sent from the email address
associated with the account display the recipient, preceeded by To:,
instead of the sender.
Puts quotes around username and password for IMAP authentication.
Also, if authentication fails, closes the connection so that it will
be retried. Otherwise, there is no way to fix the problem, say, by
changing the password in the Incoming Settings.
ConcurrentHashMap seems to serialize as a HashMap. Not sure why or
how.
This change has re-enabled the saving of the unread counts during an
orientation change, giving somewhat fast response. If it fails again,
just comment out the block of code.
Provide two options for each Account:
Compact (which VACUUMs the accounts and prunes recreatable
attachments)
Clear all data (danger!) (which wipes all messages and attachments in
the account, except placeholder deleted messages)
Displays a Toast when the Compact or Clear is queued, and another
Toast with the shrinkage results.
(Also, a small change to increase probability of seeing messages after
a sync, by setting the needsRefresh on all folders when a sync is done.)
orientation change (onResume) until I figure out the
ClassCastException
Will slow down display of unread message counts, but they will show up
after a slight delay.