1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04:00
Commit Graph

76 Commits

Author SHA1 Message Date
Bao-Long Nguyen-Trong
93b95b85b2 Fixed NullPointerException when trying to send message with to text body (attachment only for example). The message would end up being stuck in the outbox. 2009-05-22 05:42:16 +00:00
Bao-Long Nguyen-Trong
49426f3107 Removed some logging that should not have made it to SVN 2009-05-21 18:53:27 +00:00
Bao-Long Nguyen-Trong
f4d7b54fb6 Bumped back FETCH_BODY_SANE_SUGGESTED_SIZE to 50K 2009-05-21 18:49:39 +00:00
Bao-Long Nguyen-Trong
bae5fba355 Better HTMLization of plain text emails using <pre>: spaces / identation are now properly displayed 2009-05-20 04:44:45 +00:00
Bao-Long Nguyen-Trong
d8724784dd . Minor memory usage optimization of how we HTMLize plain text emails 2009-05-20 04:39:51 +00:00
Bao-Long Nguyen-Trong
23797b62ee . Fixed issue 423:
. HTMLized version of plain text email is not loaded up as a MIME part of the message anymore. We use a custom seperate variable in the text body class.
2009-05-20 04:36:20 +00:00
Bao-Long Nguyen-Trong
435e2c3532 Fixed issue 404:
. Free up memory as we go in MessagingController.synchronizeMailboxSynchronous()
  . IMAP: We only do a partial fetch of the text body of large messages during background sync. This allow for faster syncs and avoid expensive parsing that lead to OutOfMemoryError
2009-05-20 04:27:51 +00:00
Bao-Long Nguyen-Trong
42194562c1 Minor optimization to avoid the OutOfMemoryError we have been getting 2009-05-17 05:59:28 +00:00
Bao-Long Nguyen-Trong
724c0aed31 Minor optiomization to help with the OutOfMemoryError pbs we have been getting 2009-05-12 05:31:21 +00:00
Bao-Long Nguyen-Trong
bb8629abe8 . Potential fix for issue 404: now doing all HTMLization in one pass to minimize the amount of String objects 2009-05-10 07:05:24 +00:00
Bao-Long Nguyen-Trong
5b0dee8cc0 . Large messages are now only retrieved once for POP3 servers that don't support the TOP command 2009-05-10 05:47:26 +00:00
Daniel Applebaum
97a4f97b64 Issue 234
Fix POP3 deletes.  Verizon uses - in their POP3 UIDs, and K9 was
assuming that only Local UIDs have -.  Removed that assumption.  Also,
after issuing DELE on POP3 connection, need to also issue a QUIT.  The
delete code in MessagingController now closes the folder after
deleting a message, which will slow down IMAP deletes, but also
conserve connections, so is probably a net benefit.
2009-05-09 15:22:36 +00:00
Jesse Vincent
718e27dab9 WebDavStore updates to fix authentication issues - based on design and counselling from ismarc31 2009-05-07 03:17:26 +00:00
Daniel Applebaum
96c98e3070 Reformat executeSimpleCommand 2009-05-06 00:16:47 +00:00
Daniel Applebaum
27e0ec1b80 Decrement mMessageCount when an untagged EXPUNGE is received 2009-05-06 00:12:30 +00:00
Daniel Applebaum
aac64b03a5 Make sure not to lose an untagged EXISTS, even if it came during a
command that we didn't handle properly.
2009-05-05 04:03:56 +00:00
Daniel Applebaum
651642faeb Automatically re-synchronize the IMAP protocol. Previously, losses of
synchronization could happen if an Exception was thrown while parsing
an untagged response without using executeSimpleCommand.  For
instance, while doing a fetch.  Once synchronization was lost, later
commands would fail in surprising ways.  One manifestation of such
failures was spontaneously emptying of folders when search results
were not returned properly.  The new code makes sure to only accept OK
responses with the tag of the command, and discards the untagged
responses from previous command.
2009-05-05 00:42:05 +00:00
Jesse Vincent
7daf4ef1e6 We don't actually want to clear out the plaintext version of the message. K-9 uses that for replies 2009-05-05 00:29:15 +00:00
Jesse Vincent
323c294250 Move our linkification and htmlification of mesages from on-display to on-sync.
There's no need to defer this work until the user is waiting for it
2009-05-03 20:52:32 +00:00
Jesse Vincent
4b444b2bcf don't try to recreate the indexes on every db update as it will surely fail 2009-05-03 04:22:34 +00:00
Jesse Vincent
ab82b10918 Add a few indexes to the message and folder lists 2009-05-02 22:14:45 +00:00
Daniel Applebaum
d1661ee1f5 Reset mMessageCount before executing SELECT. Only handle untagged
responses to SELECT once.
2009-04-21 05:34:57 +00:00
Daniel Applebaum
f0f07c36de Issue 63
Issue 201
Issue 224
Issue 342

Handle untagged EXISTS messages at any time.  Should increase
synchronization speed and accuracy.

Handle IMAP servers that send a NIL where a literal is normally.
Avoids failure to sync when folder contains certain messages.

Throw Exception if folder message count is less than 0, avoiding
accidentally emptying a folder.
2009-04-21 04:22:02 +00:00
Daniel Applebaum
4ad4216de5 Fix problems connecting to POP3 servers which lack the CAPA command. 2009-04-15 13:05:29 +00:00
Daniel Applebaum
aa4a92a541 Application of patch submitted by cnehren for Issue 356, with
generalization.
2009-04-11 15:24:22 +00:00
Daniel Applebaum
932adf5ed2 Issue 143
Merged from branch issue143 @ revision 426:

Complete replacement for SharedPreferences.  Uses SQLite database
stored in application's databases folder.

Will load from legacy preferences if DB-backed preferences are empty.

Editor conforms to atomic commit contract.
2009-04-11 14:33:54 +00:00
Daniel Applebaum
5711abdee5 Issue 234 Issue 366 Issue 329
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.
2009-04-11 02:11:17 +00:00
Daniel Applebaum
bf98b5c2af Issue 366
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.
2009-04-09 17:48:05 +00:00
Matthew Brace
1b5fdb99d9 Fix for authentication issue describe in issue 359. 2009-04-02 01:52:00 +00:00
Daniel Applebaum
45227e2708 Delete now uses LocalFolder.moveMessages
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.
2009-03-07 07:20:15 +00:00
Daniel Applebaum
15e5cb4eaf Provides the ability to move and copy messages between folders. Issue
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.
2009-03-05 07:32:45 +00:00
Bao-Long Nguyen-Trong
db426c44b7 . Applied patch from dumbfile which fixes issue 307 and issue 265 related to date format when running on a device with a non US locale 2009-03-04 19:49:39 +00:00
Daniel Applebaum
73d5e16178 Fix for problem with r386 found by kanisdragon. 2009-03-02 00:47:27 +00:00
Matthew Brace
91573e19ac Fix for null pointer exception when there is an exception thrown and the caught in processRequest without properly terminating checks (ie, during the recursive calls, resulting in a null data set being returned). 2009-02-26 06:56:30 +00:00
Daniel Applebaum
6f8a243bcc Issue 318
When performing a database upgrade, clear all cached attachments and
attachment thumbnails
2009-02-25 03:35:25 +00:00
Daniel Applebaum
2d31b4e52d Issue 179 and Issue 320
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.
2009-02-25 01:50:20 +00:00
Daniel Applebaum
0e9d1f195e Issue 319
Do not reset all folder settings when a database upgrade occurs. (Or
any other event that wipes all of the local folders.
2009-02-24 05:03:28 +00:00
Matthew Brace
acea3ab3b5 Pull destination url from OWA login page. Order of priority for destination is: User specified mailbox path, destination form value on OWA login page, "/" character. 2009-02-19 04:35:15 +00:00
Bradley Young
61aba8fa78 Changed host from static to instance. Should help to prevent conflicts with multiple accounts. 2009-02-11 21:07:25 +00:00
Daniel Applebaum
3e4843e756 Issue 131
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.)
2009-02-10 03:18:42 +00:00
Matthew Brace
8c466c35ba Add proper handling for relative paths from initial login page for WebDav. Provides support for Exchange 2007. 2009-02-09 06:48:57 +00:00
Matthew Brace
da46773f74 Fix potential index issues when less than 10 emails are in the folder when fetching messages in WebDavStore. 2009-02-09 01:50:31 +00:00
Daniel Applebaum
98ff7af644 Just can't believe the prior code was right. Possible fix for Issue 234. 2009-02-06 20:11:36 +00:00
Matthew Brace
f184350aec Fix for index out of bounds exception (regression) from r330 2009-01-31 22:09:16 +00:00
Matthew Brace
0a6bc9bdd4 Changed authentication method. Added support for authentication if the server returns a 401 status code. No longer requires form based authentication. 2009-01-27 05:39:41 +00:00
Matthew Brace
de24b6a166 Added support for optional Form Based Authentication login path and user mailbox path in account settings. 2009-01-25 07:37:10 +00:00
Daniel Applebaum
7d5d473563 Fix for Issue 238
Only fixes display of attachment filenames for newly downloaded
messages.  Will not correct display for message already in the
LocalStore.
2009-01-24 19:35:57 +00:00
Daniel Applebaum
b6e9910e00 Needed for r326 Issue 91 2009-01-24 18:54:47 +00:00
Matthew Brace
483857ed74 A missed hardcoded value. This should resolve most 400 Bad Request issues. It is unknown if this affects the Invalid Verb responses. 2009-01-22 03:53:09 +00:00
Matthew Brace
1cda221fa3 Added support for Exchange path. This is not specifying the path for authentication or for the mailbox. This is support for situations like "https://www.myserver.com/owapath" for authentication. 2009-01-21 05:27:22 +00:00