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

349 Commits

Author SHA1 Message Date
cketti
5627117ddf Use 997 as maximum line length for References header. See http://code.google.com/p/k9mail/source/detail?r=1714 for details. 2010-05-21 16:37:45 +00:00
cketti
c5486469c2 - Add menu item to show additional headers in the message view
- Add option to save all headers locally (incoming server settings)

Applied patch provided by timmlinder with small modifications.

Fixes issue 43
2010-05-21 15:34:29 +00:00
cketti
c29722a56c Make sure the References header doesn't exceed 998 characters and the value won't get Q-encoded. Thanks to fiouzy for providing the patch.
Fixes issue 1559
2010-05-21 12:20:32 +00:00
Daniel Applebaum
6afb8c8506 Make sure to compare capabilities using upper case. 2010-05-20 11:55:42 +00:00
Daniel Applebaum
59f22d8e7e Save capabilities in upper case so we handle them case-insensitively,
too.  Make sure all CAPABILITY-detection constants are written in
upper case.
2010-05-20 04:19:15 +00:00
Daniel Applebaum
d873ecbe7a From cketti's reminder: check untagged response with equalsIgnoreCase.
Also, reset mCombinedPrefix when the delimeter is discovered.
2010-05-20 04:13:49 +00:00
Daniel Applebaum
af55c6f48b We don't need to log the content of the map each time we add to it. 2010-05-20 03:38:16 +00:00
Daniel Applebaum
44da2e1fe6 After discussion with cketti, reinstate using LIST to find the path
delimeter, but only if the server does not support NAMESPACE.  Since
we've encountered non-compliant servers that freak out at the LIST
command, enclose in a try/catch structure so that failures do not
totally prevent IMAP communication.
2010-05-20 02:33:44 +00:00
cketti
6e3183f54f Moved classes Regex and DomainNameChecker from android (package) namespace to K-9 namespace. This way we're protected from modifications to these classes in future Android versions. 2010-05-19 19:16:36 +00:00
cketti
58b8479612 Code refactoring:
- Created "controller" and "mail.filter" package
- Moved a lot of classes to new/other packages
- Removed unused classes: NoSuchProviderException, MessageDateComparator
2010-05-19 18:17:06 +00:00
cketti
22ce159fe6 Merge imap-parser branch.
Fixes issue 1547.
2010-05-19 13:31:48 +00:00
Daniel Applebaum
9cf42ef913 Provide for tracking all WakeLock usage.
Simplify WakeLocks use by pushing.

Correct fault in IMAP IDLE WakeLock usage.  The ThreadLocal in
MessagingControllerPushReceiver meant that the WakeLock acquired when
the DONE was sent was not being released when entering back into IDLE
state.

Consolidate the account notification so that all Activities use the
methods in MessagingController.
2010-05-17 00:30:32 +00:00
Jesse Vincent
ecebdf18cd find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs --unpad=paren 2010-05-15 19:46:16 +00:00
Daniel Applebaum
b51bce6ebf Fixes Issue 1551
Fixes Issue 1577

Issue 1551: 
Some IMAP servers send untagged EXPUNGEs to IDLEing
clients without ever haven't sent an untagged FETCH.  The untagged
EXPUNGEs are harder to deal with because they don't have a UID.  So,
if the user has elected to have the IDLE connection start with a poll,
we can maintain a map of message sequence numbers to UIDs that we can
use to figure out which message to delete.  To mitigate the risk of
the map falling out of date, we do a UID SEARCH UID before removing
the local copy of the message, just to make sure the message is really
gone from the server.  If we detect an error, do another poll to
resync the map.

Issue 1577:
Restore the removal of notifications for an account when the account's
unread message count goes to 0.
2010-05-15 19:35:07 +00:00
Daniel Applebaum
8b92bc3836 Fixes Issue 1474
Fixes Issue 1562

Issue 1474:
Provide new facility to totally wipe all data for an account but leave
settings intact.  This is useful because sometimes storage is so full
that SQLite cannot perform the usual VACUUM or message deletion.

Add confirmation dialogs to destructive Clear and Recreate operations.

Remove destructive Clear from FolderList so as not to have to
duplicate the confirmation dialogs.

Issue 1562:
Suppress notifications when new messages arrive in Trash, Sent or
Drafts special folders.
2010-05-12 04:17:52 +00:00
Jesse Vincent
ba021597c4 astyle 2010-05-12 02:51:59 +00:00
cketti
37b42f58a6 Fix error handling code in DB upgrade. 2010-05-10 00:14:26 +00:00
Daniel Applebaum
6aeac22dad Fixes Issue 300
Fixes Issue 772
Fixes Issue 852

Issue 300: Handle incoming IMAP tokens in a case-insensitive manner

Issue 772: Add Yahoo workaround

Issue 852: Add configurable IMAP IDLE refresh frequency in Incoming
server settings

Also:
Add configuration option for whether push system executes a poll on
each connect.

Move the configuration for the maximum number of push folders to the
Incoming server Settings.
2010-05-09 15:27:41 +00:00
cketti
683f31e32e Code cleanup: Fixed some warnings 2010-05-03 13:46:55 +00:00
Jesse Vincent
c31b224de3 enable dan's new "resync accounts on reconnect" code for push 2010-05-03 00:20:27 +00:00
Daniel Applebaum
989e89f5b0 Fixes Issue 1048
Zero out unread and flagged counts on all folders in an account being
cleared.
2010-05-02 05:37:48 +00:00
Daniel Applebaum
ee1b4b70e2 Fixes Issue 1412
Keep search results in sync with newly arrived or deleted messages.
Intentionally does not remove messages from search results due to
flag (flagged/starred or read/unread) state changes, because that
would be awkward while manipulating messages in search results.
2010-05-01 20:06:52 +00:00
cketti
c6fee3efb9 Quoted strings can contain '"' in escaped form. readStringUntil() fails to unescape and will will return prematurely when the string contains an escaped '"' character.
Fixes issue 512.
2010-04-30 13:51:19 +00:00
Jesse Vincent
8af7f4a7b6 find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs --unpad=paren 2010-04-29 04:59:14 +00:00
Daniel Applebaum
0459be3bb8 Fixes Issue 868
When connected to a server that does not automatically send an
untagged UIDNEXT with the responses to SELECT, explicitly SEARCH for
the currently highest UID in the folder on the server and then add 1
to it to get the UIDNEXT.
2010-04-27 04:06:26 +00:00
Daniel Applebaum
78a101547c Provide for doing a full poll/sync of a folder whenever the IMAP IDLE
connection is established.  Turned off for now, but just get rid of
the false && on line 2641 in order to enable it.
2010-04-27 03:02:17 +00:00
Jesse Vincent
55d70c3bf7 rather than fetching 10 messages on push reconnect, fetch a full
compelment of displayable messages. This should help eliminate "Gaps"
when reconnecting push connections after going offline.
2010-04-26 16:20:43 +00:00
Daniel Applebaum
6cfcfb953f Aggressively get rid of obsolete Flag X_NO_SEEN_INFO. It was
interfering with "unread" searches on POP3 accounts.

Flags really should be normalized in the database to eliminate the use
of LIKE while searching by Flags.
2010-04-25 06:17:15 +00:00
Daniel Applebaum
41c5dc5986 Fixes Issue 1448
Fixes ClassCastException.

Also:
Envelope and star in Accounts Activity are now both "hot".  Tapping
the main part of the search opens the full search; tapping the
envelope opens the search only for unread messages; tapping the star
opens the search but only for starred messages.

The envelope and star are a bit small to reliably tap.  Both options
should be available via long-press, also.

Methodology will be extended to real accounts, as well.
2010-04-22 02:20:35 +00:00
cketti
57acdb7033 Create 'folders' table with 'flagged_count' field when installing K-9 Mail. Previously it was only added when updating the application. 2010-04-17 21:27:06 +00:00
Daniel Applebaum
664c4d6a78 Fixes Issue 1394
Computing the account size is pretty slow for big accounts, and making
this functionality optional should be considered.

Also, displays the number of flagged messages ("stars") in each
account in the Accounts list and each folder in the FolderList.  Needs
better presentation of the flagged message counts, but this works as a
proof-of-concept and gets the data structures built.
2010-04-16 14:33:54 +00:00
cketti
110a6eb1c7 Removed unnecessary null pointer check. 2010-04-16 12:48:03 +00:00
cketti
57cc4cd735 Code cleanup. Fixed lots of warnings reported by Eclipse.
- Removed unused imports
- Removed unused variables/code
- Parametrized raw types
- Added @Override annotations
- Added hashCode() when equals() was overriden
2010-04-16 12:20:10 +00:00
Daniel Applebaum
86f3b28f79 Fixes Issue 1413
Look for + as acknowledgement that we're in IDLE mode, not "idling"
string.  

Also, to help with battery life:
1) Give up trying to IDLE after 10 failures.
2) Increase retry delays
2010-04-15 03:17:25 +00:00
Daniel Applebaum
9a8126d89c Addresses Issue 1348 and Issue 95
Not done, yet, but available for developers to use.

Definite things to be done in the short term:
1) Allow user to hide canned searches in Accounts Activity
2) Make newly arrived mail immediately appear in search results.

Possible improvements:
3) User-definable searches
4) Make newly deleted mail immediately disappear search results.
5) Make message with flag changes immediately appear/disappear from
   search results.
6) Show search result size in Accounts Activity.
2010-04-06 02:54:48 +00:00
Daniel Applebaum
d08c9d6ce2 Fixes Issue 957
Fixes Issue 868

May not be perfect, either, but may help in some situations with
getting all emails to arrive via push.
2010-04-06 02:39:57 +00:00
cketti
648bec3efc Include support for another bad date format in the IMAP response parser.
Fixes issue 1295
2010-03-25 15:21:05 +00:00
cketti
50cd60787f Don't convert MIME content-type headers to lower case as this seems to cause problems.
Thanks to xingwang.xu for the analysis.

Fixes issue 1289
2010-03-25 14:39:07 +00:00
cketti
d595033fa8 Work-around for a buggy POP3 server software that places "+OK" in front of every line of the unique-id listing (UIDL response).
Fixes issue 1237
2010-03-25 13:42:48 +00:00
cketti
938317e700 Get rid of the "Did not get proper search result" message. This helps with buggy IMAP servers that don't return an untagged SEARCH response if nothing was found. Other untagged responses are simply ignored.
Fixes Issue 907
2010-03-25 01:24:21 +00:00
Daniel Applebaum
fa73f71e95 Fixes Issue 790
Tolerate malformed UIDL response.  Thanks to @bengnc for thorough
analysis in Issue 790.
2010-03-18 03:43:39 +00:00
Daniel Applebaum
76f33ba5ff Fixes Issue 1330
Flush the output stream so that small messages have bodies.  (And
presumably so that the entirety of big messages are sent.)
2010-03-18 03:23:45 +00:00
Daniel Applebaum
ec9f395498 Fixes Issue 1090
Don't try to fetch content while reporting errors.

Generate unique URL for each upload.
2010-03-18 02:50:05 +00:00
Daniel Applebaum
f0808fb3e0 Fixes Issue 1291
Provides for the user to elect to have certain folders displayed first
in the FolderList.  Folders so elected are displayed in alphabetical
order first, then folders not so elected are displayed alphabetical
order.

No special handling is done for Inbox any more, except that it is in
"top group" by default, to preserve current behavior until the user
changes the settings.
2010-03-07 17:02:21 +00:00
Daniel Applebaum
ecc10e572f Fixes Issue 1224
Implement DEFLATE compression for IMAP communication, enabled by
default.  User can disable compression for Wi-Fi, Mobile, or Other
networks, if it causes problems or if uncompressed communication is
faster, which is possible on Wi-Fi and wired networks, especially.

"Other" is to allow for the Android platform to introduce new
networking types without having to immediately change K-9 Mail.
However, as those arise, new network types should be added as explicit
types in K-9 Mail.
2010-03-07 00:30:40 +00:00
Daniel Applebaum
c0e4220b82 Fixes Issue 1116
Fixes Issue 1278
Fixes Issue 119
Fixes Issue 1077
Fixes Issue 1238

Worked performed by danapple0 and cketti in
https://k9mail.googlecode.com/svn/k9mail/branches/issue1116

Add support for most batch ops (except move and copy) in search
results.  Add support for batch move and copy on real folders.

Increase efficiency of bulk IMAP moves and copies by doing as multiple
UID operations.

Eliminated serialization of Account objects.

Provide up-references in useful places to make all future code cleaner
and more efficient.

Fixed a bunch of draft handling

Merged from issue1116 branch, except for Account.java, which was
copied wholesale.  Account.java was manually merged in issue1116
branch at r1489

svn merge -r 1459:1489 https://k9mail.googlecode.com/svn/k9mail/branches/issue1116 .
cp ../issue1116/src/com/fsck/k9/Account.java src/com/fsck/k9/Account.java
2010-03-04 04:00:30 +00:00
cketti
6fb59467b7 Changed SmtpTransport.writeLine() to only use one OutputStream.write() call. Apparently some servers got the "be liberal in what you accept from others" part of the robustness principle wrong. When we used multiple calls in writeLine() (command + CR + LF) a separate TCP packet was send each time. It appears that those broken servers accepted the DATA command after DATA + CR and interpreted the LF as part of the actual data. This caused our headers to become part of the body because that LF was interpreted as the empty line that separates headers and body.
As a side effect of this fix sending mail could be slightly faster now due to less packets being sent.

Big thanks to Kevin Newland of Michigan Technological University for organizing a test account.

Fixes issue 799
2010-03-02 02:48:52 +00:00
Daniel Applebaum
97c7bf1d65 Hopeful (but untested code) to get updated capabilities after
successful CRAM-MD5 authentication.
2010-02-27 17:48:00 +00:00
Daniel Applebaum
f6e7d5d4c0 Fixes Issue 1252
Handle CAPABILITY response in following cases:
1) When sent as part of the banner, no longer sends explicit
CAPABILITY command

2) When sent as an UNTAGGED response to LOGIN, updates stored
   capabilities.

3) When sent as part of the TAGGED response to LOGIN, updates stored
   capabilities.

Due to odd implementation of the CRAM-MD5 authentication, the
capability updates will not happen as part of the CRAM-MD5
authentication.
2010-02-27 17:34:38 +00:00
cketti
ec3d9eb9ea Removed code from ImapStore.internalOpen() that tried to get the path delimeter before SELECTing a mailbox. This shouldn't be a problem since the delimeter
a) is already known if the server supports the NAMESPACE capability.
b) is included in the prefix anyway (=also known if namespace was set manually).
c) isn't needed when selecting a mailbox because we currently don't support folder hierarchy. So the delimeter is included in the folder name.

Fixes issue 1217
2010-02-20 01:07:38 +00:00
Jesse Vincent
f9d39e4814 Back out Attachments-on-SD support (it's on a feature branch now, while
Bao-Long makes it extra-awesome)

This commit should revert:
r1445
r1437
r1436
r1449
r1442
r1441
r1419
r1414
r1413
2010-02-18 03:28:31 +00:00
cketti
51b92aaf80 Fixes issue 1225 2010-02-14 15:51:09 +00:00
cketti
6d84f199c5 Enforce maximum line length for 8-bit encoded messages transmitted via SMTP (998 characters + CRLF).
Fixes issue 1176
2010-02-13 23:45:45 +00:00
Bao-Long Nguyen-Trong
e435d9d616 Fixed issue 1205: Attachment storage location setting now takes effect immediatly. LocalStore is also better at handling when attachment are stored in a mix of internal and external storage (migration state after a setting change) 2010-02-13 19:07:10 +00:00
Daniel Applebaum
2c3da067c3 Fixes Issue 1219
At cketti's suggestion, change the methodology for counting
server-side unread messages on an IMAP server from STATUS (UNSEEN) to
SEARCH UNSEEN NOT DELETED.  STATUS (UNSEEN) does not ignore DELETED
but unexpunged messages and leads to incorrect results.

http://www.mail-archive.com/c-client@u.washington.edu/msg00929.html
http://www.mail-archive.com/c-client@u.washington.edu/msg00931.html

This variant only checks for unread messages in the last 300 messages
in the folder, so will be wrong if there are unread messages earlier
in the folder.  However, it'll be more often correct than the old
version for the marjority of users.

Also, change the opening of folders for IMAP IDLE purposes to
read-only using EXAMINE instead of SELECT.
2010-02-13 17:02:27 +00:00
Bao-Long Nguyen-Trong
6fe2dad5cc Added some defensive code to prevent crashes caused by the LocalStore getting in a bad state due to issue 1205 (still being worked on). This fixes issue 1214. 2010-02-11 21:16:37 +00:00
cketti
2bd4f9632b Better handling of IMAP FETCH responses.
Fixes issue 1068
2010-02-10 13:52:25 +00:00
Bao-Long Nguyen-Trong
131280c3f2 Still init LocalStore.mExternalAttachmentsDir even if sd card is not ready so that the object does not end up in a bad state 2010-02-07 05:58:04 +00:00
Bao-Long Nguyen-Trong
8403a265d9 We still need to be able to instanciate the LocalStore when the sd card is not mounted. So we do no throw an exception then. Exception will be thrown when we try to do attachment related things 2010-02-06 15:44:21 +00:00
Bao-Long Nguyen-Trong
55dac7ee4e Added option to have attachments store on sd card
(this is still a rough implementation)
2010-02-06 15:22:59 +00:00
cketti
c64c0a1c30 Replaced base64 as default encoding for text bodies with quoted-printable. Please use issue 1176 for discussion. 2010-02-05 14:26:09 +00:00
cketti
14ee970b18 Fixed EOLConvertingOutputStream.
write('\r');flush();write('\n'); would lead to "\r\n\r\n" instead of simply "\r\n";
2010-02-05 02:36:52 +00:00
cketti
0422cae33e Implemented data stuffing. 2010-02-05 02:32:32 +00:00
cketti
45036ae5c8 Use 8bit transfer encoding for the text body if SMTP server advertises 8BITMIME. In all other cases base64 is still used (including saved copies in IMAP "Sent" folder).
Feel free to revert this if anything breaks.
2010-02-04 23:37:50 +00:00
cketti
6480e78b97 r1396 caused trouble for some clients due to a missing "MIME-Version" header. This should fix the problem. 2010-02-04 17:28:35 +00:00
cketti
c6d29cb10e Fixes issue 21 (All messages are turned into multipart messages) 2010-02-03 19:56:20 +00:00
cketti
8049e90b8c Changed IMAP command "UID SEARCH (HEADER MESSAGE-ID %s)" to "UID SEARCH HEADER MESSAGE-ID %s"
Fixes issue 1031.
2010-02-03 17:25:15 +00:00
Jesse Vincent
74aac85048 Use a real hostname rather than localhost.localdomain.
Fixes Issue 45

Patch by cketti
2010-02-02 02:06:35 +00:00
Jesse Vincent
a58095aae1 URLEncode username and password for accounts, so as to not fall apart on
nice simple characters like ':' in passwords.

Patch by cketti

Fixes Issue 1155.
2010-02-02 02:06:29 +00:00
Daniel Applebaum
ef1abffa26 Revert r1386 because it will break many folks email sending. 2010-01-31 19:11:51 +00:00
Daniel Applebaum
a91e3e10e2 May have some beneficial impact on Issue 21 and Issue 799.
Just removes the base64 encoding on the text/plain body parts.  Does
not make the sent messages non-multipart.
2010-01-31 15:26:02 +00:00
Jesse Vincent
ff390b388a Bullet-proofing for database upgrades and better fallback for failures 2010-01-24 20:41:04 +00:00
Jesse Vincent
2c406a58b0 When disconnecting from an SMTP server, send a quit command to be a
better internet citizen. Fixes Issue 1044.
2010-01-19 02:20:24 +00:00
Jesse Vincent
4493044340 astyle pass 2010-01-18 00:11:02 +00:00
Jesse Vincent
9301aabc8c CRAM-MD5 for SMTP is now configurable 2010-01-18 00:10:49 +00:00
Jesse Vincent
22e771ef2a Disable our not-so-hot preview generation as part of database upgrade
for now. it took a long time and got mediocre results.
2010-01-17 22:54:08 +00:00
Jesse Vincent
591a3af6dc Eliminate "select" mode in favor of a unified swipe and context menu -based
always-available select action.  For the moment, this means
that widgets_on_left does nothing at all. based on feedback, I may kill
the preference and multi-mode behaviour entirely in favor of "show stars?"
(and possibly "show stars on left"

Stars, "checkboxes" and color bars updated to actually fit in wide mode.
2010-01-17 04:20:39 +00:00
Daniel Applebaum
f4ceb8d2bc Fixes Issue 673
Fixes Issue 806

Make sure to close opened folders in finally blocks in
MessagingController.

Don't make another connection when deleting or copying a
message.  (Nicely speeds up copy and delete, as well.)

Another connection is still created for creating a folder while
copying or deleting (a pretty rare event), and the IMAP IDLE
connections are not re-used for user initiated activity.
2010-01-16 16:22:20 +00:00
Daniel Applebaum
a89bd8e081 Only use the IDLE timeout for the folder while actually in IDLE state.
May help with Issue 1022, Issue 952, Issue 895
2010-01-16 14:14:12 +00:00
Jesse Vincent
64469e4b4e ran artistic style against src/com/fsck/k9/ 2010-01-14 01:07:28 +00:00
Jesse Vincent
5617b629d3 Added a "preview" column to messages containing a brief summary of the message 2010-01-13 03:36:36 +00:00
Bao-Long Nguyen-Trong
11b7157772 Guess mime type (when not specified) of attachments of received messages using file name extension so that we can open them 2010-01-12 02:06:46 +00:00
Bao-Long Nguyen-Trong
f965417479 Exclude deleted messages from search results 2010-01-12 00:59:13 +00:00
Daniel Applebaum
e0b98cac21 Correct Exception text 2010-01-09 19:49:54 +00:00
Jesse Vincent
19adadae11 actually specify the size of our BufferedOutputStream as 1k to parallel
other implementations and quiet down a consistent warning in our android
logs
2010-01-08 23:47:34 +00:00
Daniel Applebaum
2b37fe6864 Restore long-lost debugging line 2010-01-06 03:44:23 +00:00
Jesse Vincent
6caec1100c Incorrect (and ancient code) would accidentally clobber the wrong attachment
(and only one, rather than all) when deleting a message.
2010-01-03 23:23:13 +00:00
Jesse Vincent
483655fa20 Log.w shouldn't be wrapped in an "if debug" statement. 2010-01-03 20:34:22 +00:00
Jesse Vincent
0e273893bd Further log tweaking 2010-01-03 02:00:20 +00:00
Jesse Vincent
a926911e7f rerun astyle 2010-01-03 01:50:51 +00:00
Jesse Vincent
1c5073039a Further debug/info/verbose logging cleanup 2010-01-03 01:50:41 +00:00
Jesse Vincent
63b6f6bf62 Refactoring to better propagate "folder" along with messages as they're instantiated 2009-12-27 17:22:26 +00:00
Jesse Vincent
70f35a537e If we loaded a message from the local store without an associated folder, load up its folder. 2009-12-27 16:53:51 +00:00
Jesse Vincent
da45b81866 minor query reformatting 2009-12-27 16:53:45 +00:00
Jesse Vincent
580a562085 Lift the generic getMessages and searchForMessages up to the "store"
level from the "folder" level so we can search for messages across
folders
2009-12-27 16:53:37 +00:00
Jesse Vincent
6dcb10add6 Lift our column list for "load messages" out to the LocalStore, as the
first part of lifting "get messages" out of "folder" for search
2009-12-27 16:53:31 +00:00
Jesse Vincent
09ecd2bc9a Make it possible to instantiate a localFolder by id. 2009-12-27 16:53:16 +00:00
Jesse Vincent
47b338fb94 Move message population to the message class. 2009-12-27 16:52:57 +00:00
Jesse Vincent
151ae5a2a3 First pass at adding "Searchable" infrastructure 2009-12-27 16:50:37 +00:00
Jesse Vincent
9ba102599f Fix SQL statmeent 2009-12-27 16:50:28 +00:00
Jesse Vincent
9bcc991ec8 Extract out the code to "load mesages from SQL" from inside our "load messages in this folder" code 2009-12-27 16:50:21 +00:00
Jesse Vincent
9796cb6487 First rouind of extracting the "load messages from the db" column list 2009-12-27 16:50:14 +00:00
Daniel Applebaum
41d7ca51a3 Implementation of complete IMAP two-phase "delete/expunge" behavior.
On each IMAP account, the expunge behavior can be set to expunge
messages in a folder as soon as a move or delete is performed on the
folder ("immediately"), each time the folder is polled, or only when
executed manually.

In the Message List, there is now an Expunge action in the option
menu.

In the Folder List, there is now an Expunge action in the context
menu (long-press on the folder).

For IMAP accounts, it is also possible to disable the copying of deleted messages to the
Trash folder, by setting the Trash folder to -NONE-.

Fixes Issue 536.

Separately, in WebDAV accounts, the user can now choose the
server-side equivalents of the special folders, just like for IMAP.
2009-12-20 23:13:49 +00:00
Jesse Vincent
2c9fc8b997 Backwards compatibility for the CRAM-MD5 implementation 2009-12-20 06:14:04 +00:00
Jesse Vincent
3914a78b53 xargs astyle --style=ansi --mode=java --indent-switches \
--indent=spaces=4 --convert-tabs --unpad=paren
2009-12-20 05:41:43 +00:00
Jesse Vincent
5a85446779 Initial implementation of CRAM-MD5 support for IMAP and SMTP.
Patch contributed by Russ Weeks <rweeks@gmail.com> in
<605ac1c0-808a-4f67-8c4d-736eec9587f8@e27g2000yqd.googlegroups.com>
2009-12-20 05:15:20 +00:00
Jesse Vincent
83409d78fa remove a bunch of debug logging that was cluttering production logs 2009-12-18 03:46:46 +00:00
Jesse Vincent
3f841d1494 removing debugging messages 2009-12-18 03:46:05 +00:00
Jesse Vincent
85b4c43e10 Revert "Initial implementation of loading only 25 rows from the message list"
This reverts commit 7056cb918e3bc71465053bff4070b8d3b28761a7.
2009-12-16 05:26:21 +00:00
Jesse Vincent
dc2f752f11 Bulletproofing against running IMAP Copy/Move commands with null messagelists. Fixes Issue 914 2009-12-15 17:40:04 +00:00
Jesse Vincent
a1302afe75 Initial implementation of loading only 25 rows from the message list
from SQLite at once. The hope is that this will improve perceived
performance on large folders by starting message display sooner.

In the case of a background sync while we're loading, we _may_ end up
doing more work than necessary, since we implement paging by "date
received"
2009-12-15 02:52:01 +00:00
Jesse Vincent
7b811e45a1 lazify loading of message headers in LocalFolder, since they're not needed in most of our use cases. 2009-12-15 02:51:18 +00:00
Jesse Vincent
f31b2702a4 Massive rename to K9, step 1.
Conflicts:

	src/com/android/email/Email.java
2009-12-15 02:50:53 +00:00
Jesse Vincent
eedfc0a839 step 1 of rename 2008-12-16 23:07:33 +00:00
Matthew Brace
b877a52b01 Update for folders to display the "path" that the folder resides in (ie, Inbox/Work/To Me) rather than just the name of the folder. Allows an easier understanding of the hierarchy until true folder trees can be implemented. 2008-12-16 02:06:39 +00:00
Matthew Brace
a4a07ebe19 Fixed an authentication issue with WebDav support that caused by the last update. Added support for scrolling on 2 of the screens in the account setup process to allow the full steps to be done in landscape mode. There are some graphical regressions in portrait mode from it that aren't resolved yet. 2008-12-15 04:59:03 +00:00
Matthew Brace
c544596d8f Removed display of path prefix. System now pulls all folders/subfolders. Does not display in a hierarchy, but will load messages from each folder. Only the final folder name is displayed instead of the path off of Inbox right now 2008-12-15 02:18:02 +00:00
Matthew Brace
453406a5a5 Added change to populate the url for the mailbox each time authentication occurs (url is in the response). Updated initial message population to use reverse order so initial display has newest first (only noticeable on slow connections). 2008-12-14 19:33:34 +00:00
Bao-Long Nguyen-Trong
97d10d0d25 . FIxed bug # 81: Notifications never show up wen using POP3. 2008-12-14 06:18:24 +00:00
Jesse Vincent
1d6fa64d51 Revert commit 180, as it tries to do math with UIDs, which doesn't work 2008-12-11 18:32:34 +00:00
Matthew Brace
20b46255c0 devsk's patch to fix incorrect IMAP message fetching. Fix utilizes UIDNEXT to determine which messages to grab. 2008-12-11 07:03:00 +00:00
Matthew Brace
f273805ee3 Added user preference for the display limit of messages. The display limit is also used for the visible limit increment. If no limit is specified, the default limit is used. The limit is also account specific and not global. 2008-12-11 05:25:59 +00:00
Matthew Brace
8d3579fe74 More performance improvements. Still get occasional connection errors with 50+ messages viewable due to timeout issues. 2008-12-10 23:30:00 +00:00
Matthew Brace
852e513281 Modified fetch() to call fetchEnvelope() which runs recursively, grabbing message ENVELOPEs 10 at a time rather than attempting all 100 at once. Shows a significant performance increase and a significant reduction in memory usage. 2008-12-07 20:55:26 +00:00
Jesse Vincent
d1d8345278 Merge into 'trunk'
r51837@31b (orig r127):  ismarc31 | 2008-11-10 19:10:50 -0500
Experimental branch for Exchange WebDAV support

r51838@31b (orig r128):  ismarc31 | 2008-11-10 19:24:52 -0500
Initial proof-of-concept code for WebDav support

r51839@31b (orig r129):  ismarc31 | 2008-11-10 22:02:37 -0500
Fixed a couple of migration issues and enabled WebDav as a mail type

r53269@31b (orig r132):  ismarc31 | 2008-11-21 21:55:55 -0500
Mostly rewritten class and organization.  Better implementation of message fetching.
Consolidated response parsing.  Removed a large number of redundant calls.  There is still 
some unused functions needing cleaning up, and some unimplemented actions

r53338@31b (orig r133):  ismarc31 | 2008-11-22 16:50:02 -0500
Removed more redundant and unused calls.  Implemented checking read status

r53453@31b (orig r134):  ismarc31 | 2008-11-24 20:13:24 -0500
Added support for marking messages as read.

r53454@31b (orig r135):  ismarc31 | 2008-11-24 22:04:04 -0500
Added support for deleting messages server side

r53455@31b (orig r136):  ismarc31 | 2008-11-25 01:32:19 -0500
Improved flag setting functionality, do bulk HTTP request instead of lots of little ones

r53589@31b (orig r138):  young.bradley | 2008-11-29 16:18:25 -0500
Missing some ports (webDavPorts); this causes an array index out of bounds exception when anything other than "None" or "SSL (Optional)" are selected.

Adding the three additional ports solves this issue.
r53590@31b (orig r139):  young.bradley | 2008-11-30 00:47:42 -0500
Initial support for sending via WebDav
r53591@31b (orig r140):  ismarc31 | 2008-11-30 20:12:41 -0500
Fix for display names being URL Encoded for folders.  Initial support of Uid Hashmaps instead 
of plain arrays.

r53592@31b (orig r141):  ismarc31 | 2008-11-30 21:46:06 -0500
Fix to constructor of HttpGeneric(final String uri).  URLs returned from Exchange aren't 
always fully encoded, this fixes the encoding before creating the method.

r53593@31b (orig r142):  ismarc31 | 2008-12-01 02:22:16 -0500
Completed support for using hashmaps instead of arrays for indexing urls to emails and read 
status.  Delete is safe again and read status is correct the first time through.

r53594@31b (orig r143):  ismarc31 | 2008-12-01 22:20:50 -0500
Fix for double-Inbox display issue.  Removed volumous amounts of Log.d messages.

r53644@31b (orig r157):  young.bradley | 2008-12-04 15:14:28 -0500
Fix for wildcard certificates (e.g. issued to *.example.com).  Only checking the
trust of the certificate itself, since apparently the full chain causes it to
not work.
r53765@31b (orig r161):  ismarc31 | 2008-12-06 18:55:08 -0500
Implemented new functionality for pulling message envelope.  Uses a WebDAV call for all messages rather than parsing the stream.  Message size is properly set now as well.

r54055@31b (orig r163):  jessev | 2008-12-06 19:28:24 -0500
* merge fixes
2008-12-07 00:29:11 +00:00
Bradley Young
b8e686039f Removed some commented lines of code-- testing check in to the mainline 2008-12-04 22:15:43 +00:00
Jesse Vincent
c21097af65 2008-12-04 22:03:53 +00:00
Brock Tice
33d8d3bc24 Should fix issue 111. Checks to make sure that the selected folder matches what we're generating with prefix + delimeter. 2008-12-03 19:08:03 +00:00
Brock Tice
9d45b3604e Fixed prefix separator issues. Separators are now pulled from the separator column of folder listings. Also switched the default gmail IMAP server to imap.googlemail.com (from imap.gmail.com). 2008-12-03 04:14:39 +00:00
Jesse Vincent
194d673f91 Merge into 'trunk'
r124@hotel-dan (orig r123):  jessev | 2008-11-07 03:35:09 -0500
Branch for Bradley Young
r126@hotel-dan (orig r125):  young.bradley | 2008-11-08 17:27:30 -0500
Initial checkin of self signed certificates capability.

Missing ability to save updated KeyStore.
r127@hotel-dan (orig r126):  young.bradley | 2008-11-10 13:04:49 -0500
Update to allow saving updated keys to keystore
r17200@hotel-dan (orig r131):  young.bradley | 2008-11-17 14:09:24 -0500
Updates to handle chains properly, and handle default behavior.
r17206@hotel-dan (orig r137):  young.bradley | 2008-11-29 14:14:25 -0500
Checkin for beta 2: this should be the release candidate.
2008-12-03 00:04:24 +00:00
Jesse Vincent
96653e828c * typo fix 2008-11-06 06:55:56 +00:00
Jesse Vincent
38748c59ca * Fix for "Consistently getting 'Connection Error' messages when getting new mail on a POP3 account"
Patch for Issue 67 from baolongnt++.
2008-11-06 06:55:29 +00:00
Brock Tice
c1ad8cffaa Changed a += of a null string back to the appropriate = sign. 2008-11-03 07:14:31 +00:00
Brock Tice
734606f261 Fixed my fix for the IMAP prefixes and removed debugging/self-help lines. 2008-11-03 07:01:46 +00:00
Brock Tice
be49a0c707 Removed eclipse files that appeared to be user-specific (sorry?)
Believe this fixes the IMAP prefix issue (27)
Trash still deletes itself, which is technically a separate issue, but now it deletes the *right* trash. :)

Create local branch for IMAP prefix fix (Issue 27)
r110@stilgar:  brock | 2008-11-03 00:08:29 -0500
Fixed IMAP prefix problem.
2008-11-03 06:12:04 +00:00
Jesse Vincent
8bd2f9c260 Switch from using the mime4j charset list to the Java 1.5 java.nio.charset Charset class.
Based on this comment in MIME4J, this seems like a win:


 * Utility class for working with character sets. It is somewhat similar to
 * the Java 1.4 <code>java.nio.charset.Charset</code> class but knows many
 * more aliases and is compatible with Java 1.3. It will use a simple detection
 * mechanism to detect what character sets the current VM supports. This will
 * be a sub-set of the character sets listed in the
 * <a href="http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html">
 * Java 1.5 (J2SE5.0) Supported Encodings</a> document.
 * <p>
 * The <a href="http://www.iana.org/assignments/character-sets">
 * IANA Character Sets</a> document has been used to determine the preferred
 * MIME character set names and to get a list of known aliases.
 * <p>
2008-11-02 23:17:59 +00:00
Richard Tibbetts
6cd5ce7dee Fix similar empty-cursor bug when creating a folder on open.
Turn tabs into spaces in code I changed last commit.
2008-11-02 03:56:13 +00:00
Richard Tibbetts
4f798ae9cc Fix local folder query to not die when there are no local folders, like on first install 2008-11-02 03:28:29 +00:00
Jesse Vincent
5feb435b0f removing that empty call to the heavy query helps performance even more. 2008-11-01 22:24:15 +00:00
Jesse Vincent
046943b340 Remove O(n) deep SQL queries per folderlist by cleaning up the folder "exists" check on Local message stores
* Replace the extra SQL query before each folder 'open' with an exception if the open fails. (Optimize for the common case, not the exception)
2008-11-01 21:36:23 +00:00
Jesse Vincent
5491dee81b Damn it. Weird symlink-in-checkout bug. There goes our commit history. Sorry, all.
Guess I should go back to svk
2008-11-01 21:32:06 +00:00
Jesse Vincent
12c6e53141 bin directory should never have been checked in 2008-11-01 21:23:45 +00:00
Jesse Vincent
416aafb940 extract the 'upgrade database' method. Since K-9 never had a pre-v18 database, I'm inclined to kill it, except it may serve as a useful template for the future 2008-11-01 04:26:03 +00:00
Jesse Vincent
0d0fb8a3b3 use 'localhost.localdomain' instead of 'localhost' when sending mail by smtp. This makes more mail servers happy 2008-10-29 06:24:48 +00:00
Jesse Vincent
1f90bc1ea3 Fix for http://code.google.com/p/k9mail/issues/detail?id=18
- Empty messages now generate valid MIME
- Fix by brock.tice++
2008-10-29 04:29:29 +00:00
Jesse Vincent
0df7dff688 Fix for http://code.google.com/p/k9mail/issues/detail?id=19
- Support for tabs in IMAP ID response (for OS X Leopard Server support)
- Author: yostinso++
2008-10-29 04:20:50 +00:00
Jesse Vincent
c7de66484d more renaming. 2008-10-28 02:14:16 +00:00
Jesse Vincent
c00ec35921 Grand insane rename, step 3 2008-10-28 01:22:17 +00:00
Jesse Vincent
7051cf8cc0 move step 2 2008-10-28 01:19:57 +00:00