Gaia/Email

From MozillaWiki
Jump to navigation Jump to search

The Email app offers access to a user's favorite email services while maintaining a client-like experience. This app will support IMAP and (a little later) ActiveSync. POP3 is not a priority because of its poor sync characteristics, but patches should be accepted.

Status

  • Feature Name: Gaia Email App
  • Stage: Development
  • Release Target: M3 Alpha

Team

  • UX: Casey Yee (IRC: cyee)
  • Dev: Andrew Sutherland (IRC: asuth)

Use Cases

  • Tom sees email just as critical as his ability to make/receive phone calls and text messages
  • Tom is a Hotmail user (~40% share in Brazil) and often checks his email on his desktop computer, but wants to stay connect to his family/friends so an email client is very important to him
  • Tom has the ability to check if he received new messages
  • Tom wants to be able to compose a new email directly from the Email app or from other Core Apps like the Contacts app
  • Tom wants to be able to reply/replay all to messages as well as forward messages to his friends
  • Tom uses ActiveSync with his Hotmail service, and the setup was extremely easy because all he had to do was enter his Hotmail email address and password and the Email app did all the setup for him
  • Tom has the ability to mark messages as read/unread
  • With ActiveSync, Tom has access to all his folders and messages moved and deleted between folders are automatically synced regardless of what client he accesses his inbox from
  • Because Tom loves staying connected, he also has a 2nd email address that he has setup through his work - Tom's work supports Exchange and because the Email app also supports this protocol, by entering just his work email address and password, he is able to easily setup his account
  • Tom's Email app support multiple accounts and offers his a unified inbox view of all messages from all accounts

nb: The above example used to say IMAP, but hotmail doesn't support IMAP, just POP and ActiveSync. We are aiming for ActiveSync support.

Requirements

Gaia v1
  • The Email app here offers key functionality that users would expect from existing email apps in the smartphone market today
  • In the setup flow, the user has the ability to select from some of the largest global email providers/enterprise support:
    • Hotmail
    • Yahoo! Mail
    • Gmail (Google Mail)
    • Exchange (ActiveSync) support
  • The user is offered the ability to just enter their email address and password and the Email app should automatically configure their settings
    • The Email app should default to IMAP if the service supports it and POP3 as a back-up
    • For Exchange users, the Email app should automatically detect the incoming/outgoing server settings
  • The user has the ability to check their messages in their inbox and folders
    • We offer 4 intervals for pulling messages - 15 mins, 30 mins, 1 hr, 4 hrs
  • When composing messages, the user has the ability to compose directly from:
    • The Email app by auto-filtering names from the Contacts list or by manually entering in a name
    • Another Core App such as the Contacts app when selecting an email address (this is defined in the Contacts app requirements)
  • In the compose view, the user has the ability to compose to the :
    • 'To:' field
    • 'Cc:' field
    • 'Bcc:' field
  • The user has the ability to reply/reply all to messages:
    • Original format preserved with the reply text above the message body
  • The user has the ability to forward messages
    • Original format preserved with the forwarded text above the message body
  • The user has the ability to delete messages
  • The user has the ability to mark messages read/unread
  • The user has the ability to select multiple messages at one and perform the following actions:
    • Move messages to a specific folder
    • Delete messages
    • Mark messages read/unread
  • Email messages should appear in HTML and rich text if messages are sent in that format
    • Plain text messages should default to a core font that is available in Gaia
  • The user has the ability to pinch-to-zoom in on messages to improve readability
  • Message body initial download should be <250kb with the option to 'download the rest of the message'
Gaia v2
  • The user has the option to push email messages to their email account
  • The user has the ability to select multiple messages and "forward as an attachment"
  • Selecting text, copy, paste support for email messages
  • The user has the ability attach photos from their Gallery app to draft email (new/reply/forward)

Design Specs

Milestones

An attempt to break the v1 functionality into smaller milestones:

Core Functionality

The critical path work to have things work at all. The order here is the expected implementation order.

milestone details effort / status
account maintenance list/add/change/modify account definitions
folder tree list - simple just Inbox / Sent for the accounts, no labels/data.
core live query logic - IMAP no CONDSTORE no combined inbox, no persistence
  • issue time-bounded queries to get ranges of messages, and fill-in the key message attributes: sender, flags, attachment, first line of summary without quoting magic. text/plain bodies only.
  • maybe updates from IDLE / UIDNEXT search.
  • viewslice-ish model anchored from 'NOW'
message mutation - no move UI flagged, unread, move (backend only, no UI), delete (varying by server/account: gmail just wants delete/expunge to end up in all mail, everyone else probably wants a move to a trash folder)
message composition/sending with results ending up in sent folder - simple probably just APPEND into sent, text/plain. No autocompletion of contacts.
Censor and display HTML bodies Implement sanitization logic with cid URL transformation.
message quoting detection Quote detection logic for message display and useful summary lines. Start from Thunderbird gloda and Thunderbird Conversations logic.
cached/persisted/syncable query logic - IMAP stash our chunked results in the DB
folder tree list - complex Need UX definition, but probably more hierarchical and with some message counts.
settings simple settings API and UI, integrate with the account list
IMAP search on server
ActiveSync support - basic folder list, scrolling through messages
ActiveSync search-on-server


Extended Functionality

Improvements that can be made to the core functionality. Order does not matter, although like things are clustered. These are all great things to help out with.

milestone details effort / status
contact auto-completion in composition Auto-complete contacts when composing e-mails.
initiate mail composition from the contacts UI Is this a WebIntent, or an actual WebAPI?
easy signup using Thunderbird's autoconfiguration Port the Thunderbird logic: https://developer.mozilla.org/en/Thunderbird/Autoconfiguration
HTML composition Allow sending HTML messages
file attachments Allow attaching things from whatever filesystem B2G has?
take and attach picture Trigger the camera app to take a picture and immediately attach it.
mail signatures / signature editor
show in conversation view (when server-supported) In cases where the server can provide conversation information for cheap, for example on gmail, leverage it to be able to go from a message to its context in the list of messages in the conversation.

Mail server/service compatibility

Mail services:

Provider Protocols Supported IMAP capability strings
Hotmail POP, ActiveSync
Yahoo Mail, desktop access (free, outside Asia?) none
Yahoo Mail, desktop access (free, in Asia?) POP
Yahoo Mail Plus, desktop access ($19.99 US, £11.99 UK, ...) POP
Yahoo Mail, mobile access (free) IMAP
pre-login
CAPABILITY IMAP4rev1 ID NAMESPACE X-ID-ACLID UIDPLUS LITERAL+ CHILDREN XAPPLEPUSHSERVICE XYMHIGHESTMODSEQ AUTH=PLAIN AUTH=LOGIN AUTH=XYMCOOKIE AUTH=XYMECOOKIE AUTH=XYMCOOKIEB64 AUTH=XYMPKI
post-login
CAPABILITY IMAP4rev1 ID NAMESPACE X-ID-ACLID UIDPLUS LITERAL+ XAPPLEPUSHSERVICE XYMHIGHESTMODSEQ MOVE
Google Mail/gmail IMAP (custom mapping w/custom extensions)
pre-login
CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 XYZZY SASL-IR AUTH=XOAUTH
fastmail.fm IMAP (Cyrus)
pre-login
CAPABILITY IMAP4 IMAP4rev1 LITERAL+ COMPRESS=DEFLATE ACL RIGHTS=kxte QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT SORT=MODSEQ THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE CATENATE CONDSTORE LIST-EXTENDED WITHIN QRESYNC SCAN XLIST SPECIAL-USE CREATE-SPECIAL-USE DIGEST=SHA1 IDLE SASL-IR AUTH=PLAIN