Commit Graph

22 Commits

Author SHA1 Message Date
Marc Blank 2193962ca2 Email split, part quatre: Move along, nothing to see here
* No code was harmed, er, changed in the making of this CL
* All that's happened is that code that is needed by both Email and
  Exchange have been moved into emailcommon
* This required import changes to many files, which explains the
  length of the CL

Change-Id: I4e12455ba057a4a8054fdbd0b578c73afa411c8a
2011-02-10 16:28:37 -08:00
Marc Blank fe9db17831 Show smart forward attachments in MessageCompose
Bug: 3367188
Change-Id: I59dae9781be59eebe3a68769138e8253a24455e6
2011-01-27 10:13:25 -08:00
Marc Blank 80ee607a7c Send intro text with SmartForward
* We need to include the intro text (--Original Message--, etc.) to
  SmartForwards, and somehow this got in a past updat
* Add unit test for forwarding
* Fix unit test for reply so that it works localized

Bug: 2477988
Bug: 2685784
Change-Id: I8d92f00d37a434840ec3eb237f3901cd5dc7ad09
2010-07-09 09:39:58 -07:00
Makoto Onuki b3f7dd0169 Clean up member variables.
- Fix misnomered fields.  (e.g. static mMember -> static sMember)
- Reduce visibility.  (e.g. mark as private)
- Mark final / static if possible.

Note it's on master.

There's a lot more cleanup oppotunities in the activities, but they're going
to go through a major overhaul, so I didn't bother.

Change-Id: I3fde73ba5f1f9ff675fff07c510e1e49521dde42
2010-05-11 17:06:37 -07:00
Andrew Stadler 6bcccf6284 Improve MIME & SMTP compliance on outbound messages
* Write MIME-Version: 1.0 in all outbound messages, not just those
  with multiparts.  This is required by RFC 2045.
* Unit tests

Bug: 1678296
Change-Id: Icf37d93b8b0150f490791792499865a60744adea
2010-04-07 21:46:15 -07:00
Doug Zongker 6cec1104fe relocate android.util.base64.* -> android.util.*
b/2553469 - API REVIEW: android.util.base64

Change-Id: I5394427a8e2c94b87ca45a533e417f7088a69f8f
2010-03-29 13:23:39 -07:00
Marc Blank 0ed690bfb4 Send meeting invite mail as multipart/alternative
* Turns out that Exchange 2003 requires the ics attachment to be in a
  multipart/alternative, rather than a multipart/mixed MIME message
* Exchange 2007 accepts both types
* Therefore, we change our output for this particular situation, i.e.
  a single attachment that is an ics file, to multipart/alternative
* Rename FLAG_SUPPRESS_CONTENT_DISPOSITION to FLAG_ICS_ALTERNATIVE_PART
  and make this flag do double duty - 1) suppress the Content-Disposition
  header (also required by Exchange) and 2) send the message as
  multipart/alternative
* Add unit tests for Rfc822Output to check that mime parts are composed
  properly

Bug: 2516394
Change-Id: I60e26f57b8ecaf01d0340e7828533334e0e7d45a
2010-03-17 09:59:24 -07:00
Makoto Onuki 20225d5760 Explicitly send ICS files in UTF-8.
- In memory attachments are now stored as byte[], not String.
  We can store any type of contents now.
- Added blob content_bytes to the Attachment table.
  The content field is now deprecated and not used.
- Explicitly convert ICS files to UTF-8.

- Added Utility.to/fromUtf8().

Bug 2509287
Change-Id: I3785a365a9a34039ec12ba82bd857dcdbc4de92d
2010-03-15 10:51:58 -07:00
Andrew Stadler 3aaba9eb87 First part of Exchange meeting request/reply implementation
* Added two columns to Attachment in EmailProvider
  content: content that is written directly as an attachment
  suppressDisposition: to suppress the content-disposition header
  All meeting invitation emails use these two columns; the first
  for ics attachment data (which is quite small, rarely over 1k),
  and the second to indicate NOT sending the content-disposition
  header; without this, Exchange will consider the ics as an
  attachment rather than an iMIP style message (rfc2447)
* Modified tests to include these columns; added upgrade code for
  new database version
* New columns and code are designed to be usable outside Exchange,
  although there are no other clients of the code at this point.
* Modified Rfc822Output to use the content field, if present, in
  lieu of retrieving attachment data via URL; added support for
  suppressing the Content-Disposition header
2010-02-22 12:57:33 -08:00
Doug Zongker 33c972e0c6 use the framework Base64 instead of android-common
Change-Id: Ib4f75f66fe8acb1bb5de614bb10e8c938b1d27ef
2010-02-16 09:10:18 -08:00
Doug Zongker ba714999f2 finish replacing Email's base64 implementation with android-common
Change-Id: I19adbbb884311d70073e9f7a961aa6808ac0dfb4
2010-02-11 14:47:04 -08:00
Doug Zongker f44a40cda1 replace Email's private base64 class with one from android-common
Convert all usages of com.android.email.codec.binary.Base64 to use
com.android.common.Base64 instead, except for Base64OutputStream
(which doesn't exist in android-common yet).

Change-Id: I339a1f451245138187080c7444fcabef8d13f8aa
2010-02-08 20:26:02 -08:00
Marc Blank 5fc57eccef Fix reply/forward for both SMTP and EAS; fixes #2138725
* Add new introText column in the Body database
* Reply/Forward put the appropriate String into this new column
* Rfc822Output uses this when required when streaming the message

Change-Id: I34602fdb3f91692c46fc8bc31ba0e6f680d445a0
2009-09-23 07:31:01 -07:00
Marc Blank 2b4b5e2f26 Clean up recent submission per stadler
Change-Id: I9fdaf3ccefe7eab41ad853e120af36b78a30ce7b
2009-09-20 22:24:08 -07:00
Marc Blank 2f99314326 Handle issues in SmartReply/SmartForward
* SmartReply doesn't put in header information related to the original, which
  looks like a bug in EAS, so we add our own (as we do for SMTP)
* SmartForward works properly, but doesn't put any CRLF between the new text
  and the original; we fix that by adding one after the original text.
* Addresses #2132658

Change-Id: I48efec0d02598a8e9ce2a54b4c66464e8e62e5d6
2009-09-20 15:50:31 -07:00
Marc Blank 2d5691cac1 Support bcc in Exchange (Fixes #2117849)
* Must send the bcc header for EAS

Change-Id: I38d119beed334c6bb23a09b87375804f8c03ea76
2009-09-15 15:18:46 -07:00
Marc Blank ffc681a4da Handle the case of no body being present (happens in unit tests)
* Fixes #2121403
2009-09-15 13:08:55 -07:00
Marc Blank 1d98989222 Implement SmartReply/SmartForward for EAS; fixes #2098779
* SmartForward and SmartReply are EAS commands that automatically
  include the original message and, if a forward, all original
  attachments, regardless of whether they've been downloaded to
  the device
* Both commands improve battery life by sending less data; greatly
  so for SmartForward if there are attachments

Change-Id: I12432cd5275a3b54e9a80d5cd59da437c4a086cc
2009-09-14 15:47:38 -07:00
Marc Blank f2dded3a2f Reimplement reply/forward to use mTextReply/mHtmlReply
* Move creation of final reply/forward text (i.e. new text plus
  the original) to Rfc822Output, where it belongs.
* Prepares the way for use of SmartForward/SmartReply in
  Exchange and replying w/ multipart/alternative in SMTP
* Moved test from MessageCompose to new Rfc822OutputTests, and note
  that new tests should be added (this is not a regression; there
  were never enough tests here)

Change-Id: Ibefb842f47cc9223714856d99b8d4f55b55f49e3
2009-09-13 22:28:38 -07:00
Andrew Stadler c640cbbaf3 Update SMTP to send from provider messages, and attachments
* Change Sender definition (remove old Message from API) and update
    any existing calls through that API
* Rewrite SMTPSender to use provider messages
* Add attachments to RFC822Output
* Minor bugfixes in RFC822Output
* Unit tests
2009-08-13 09:31:57 -07:00
Marc Blank 4f195e716c Use new Rfc822Output class for sending mail; fix bug in Rfc822Output
* Change EasOutboxService to use the new Rfc822Output class for sending
* Fix small bug in Rfc822Output (was writing both in Base64 and plain text)
* Fix bug in SyncManager related to auto-starting EAS outbox
2009-08-11 20:07:42 -07:00
Andrew Stadler a9a0e57436 An RFC822 streamer for sending provider messages.
* Message headers with proper encoding
* Should handle all non-US encodings properly
* Sends body text only (no HTML planned)

This is implemented but not fully tested - I'm submitting now so Marc
can evaluate & test in EAS environment.

TODO: Unit tests
TODO: Attachments
2009-08-11 14:27:36 -07:00