|
Project Information
Members
Featured
Wiki pages
Links
|
reMail downloads all your email to your iPhone and searches it instantly. reMail was acquired by Google in February of 2010, and we've decided open source the product: Read the reMail open source announcement for details Here's a a list of products based on reMail open souce code.
How to BuildYou will need a Mac to do this.
$ sh pull_dependencies.sh This can take up to an hour. It will download all the dependencies (three20, Mailcore) and then build all the crypto libraries. Mailcore and three20 will be in directories on the same level as your ReMailIPhone directory, so don't be surprised when you see them there.
You should consider following the author, @gabor for occasional reMail updates. If you want to release your own, rebranded version of reMail in the App Store, read RebrandingRemail. Project ideasThese are inspired by the top recent feature requests. Please contact the author if you want to work on any of these, and I'll try my best to support you. You'll need to find out how to contact me (not very hard). The number in parenthesis is a difficulty rating from 1-5.
See ProjectIdeaDetails for more. Is reMail Rocket Science?No. The UI is a UITouch application with some elements from three20 for displaying search snippets with markup. A stack of two libraries - MailCore and libetpan - are used to download emails from the store. Emails are stored in Sqlite3 databases sharded by time slices. How the Datastore WorksHere's a rough overview of the data flow in reMail:
Emails are stored in sqlite databases named email-X.edb, where X is a number. Each timeslice covers roughly 3 days, as controlled by EmailProcessor.dbNumForDate. There is a central contacts db which is used to autocomplete names. Each contact entry also includes the youngest and oldest time slice in which emails from that contact occur. This way, search results for people are served up almost instantly. There is a UID DB (somewhat misnamed) which stores hashes (not ids) of already downloaded emails so we can avoid downloading them again. The code includes a slightly modified Sqlite3 with better search snippet generation (the snippets generated by sqlite's built-in fts3 module are too short for our purposes, and don't include which of the fields matched). SyncManager also kicks off running ImapSync, which in turn uses ImapFolderWorker to download each each email in that folder (newest emails first). ImapFolderWorker calls the SyncManager singleton with status updates which are then displayed to the user in HomeScreenViewController (somewhat hackie, but oh well). SyncManager also stores the folder state in property list files (.plist). For each folder, it lists the range of sequence numbers that have already been synced. EmailProcessor takes the data from ImapFolderWorker (passed asynchronously via an NSOperationQueue) and writes it into the databases we mentioned above. AttachmentDownloader is used to download attachments when you first open them. How the UI worksreMail's UI is a UITouch application. Here's a chart that reflects the control flow in the application. Take the names in the boxes and add ...ViewController.m to find the source file. Add ".xib" to find the nib with the relevant data.
The Home screen view controller manages the toolbar on the bottom with status information. Potentially Useful Code for Your ProjectEven if you don't want to contribute, you may be able to use this code for your own project:
DependenciesreMail uses a number of third party dependencies: MailCore, libetpan, three20, etc. These are not included in the project for two reasons: First, we don't want to keep updating these libraries. Second, For US export control reasons, we can't include libetpan's dependencies: OpenSSL and cyrus-sasl. Instead, we included a script called pull_dependencies.sh to download and build reMail's dependencies. |