| Overview | Simple Use | Searching | Smart Folders | Composing | Colophon | Source |
Pachylet is a web service for storing and accessing your email. It retrieves your email from your POP3 or IMAP mail server, and stores it in a database on the machine where Pachylet is running. You access your email from a web browser running elsewhere. Nothing gets stored on your local computer.
Pachylet has the traditional facilities for filing your email in folders, moving it to a trash folder, and eventually deleting it. However, the system and its user interface encourage a usage style where you keep all your email, and instead of organizing it you just search it. Additionally it provides "smart folders", which let you use searches to automatically pre-sort and filter your incoming email. There's more description of this later in this document.
Pachylet tries to prevent viruses intruding on your email through attachments or through active HTML. Nevertheless, you should never open an attachment unless you are certain that you trust the sender. Pachylet prevents access to Windows executable attachments like .exe, .scr, or .pif files, and prevents scripting in HTML email. You should also be aware that if you view an HTML message by clicking on the "View as Web Page" link, the images loaded there can disclose information about your email usage. (That's why Pachylet prevents non-local image loading in normal email viewing.)
Pachylet was written by me, Andrew Birrell.
Pachylet is a copyright work. Unless we have an explicit agreement to the contrary, and except as provided in the "source" section of this document, you do not have permission to copy it or use it in any way.
While you can use Pachylet in the traditional manner (filing important messages carefully and systematically, and then deleting the rest) the user interface encourages a different style, which I recommend that you try:
The user interface is designed so that you can process your incoming messages with the central buttons "Next Unread", "Drop" and "Trash". Occasionally, you'll use "File As", and as appropriate you'll generate replies.
The "Find" button lets you do a general search (described below). "Scan" works its way through your unread messages that have arrived in your smart folders. "Folders" lets you view and manage your folders, be they normal or smart.
Messages that have been moved to the Trash folder are omitted from searches (except when explicitly searching in the Trash folder). You can permanently delete messages by moving them to the Trash, opening the Trash folder, selecting the messages, and clicking the "Delete" button.
The "Find" button lets you search for messages. A search typically takes less than a second, so it's easy to try different queries. The same queries get used in creating smart folders, described in the next section.
A search takes place within a folder (normal or smart), or across everything except the Trash folder. You describe the messages you want to find by giving some combination of words from the messages and date ranges. You can restrict the word search to the message header, or some of its fields.
By default, the "Find" dialog is set up to show the query you made most recently (or the folder you opened). If you want to ignore that and search elsewhere, click "Clear" in the "Find" dialog.
In general, the search finds messages that contain all of the given words (in any order, and not necessarily as a phrase). There's no support for "or" (alternative words), though I'll add that someday.
A "word" is a sequence of letters, digits, and "_". When searching in the entire message or in the header a word is ignored if it is shorter than 4 characters or if it occurs in more than 50% of your messages. There's no such limitation in searching "from", "to", "cc", or "subject".
The results of a search are presented sorted by date, and positioned to the most recent. That means it's usually fine to have the search criteria be quite loose, because you probably want the most recent messages. If you don't want the most recent messages, then the date range options in "Find" should help you.
Smart folders serve multiple purposes. They are the most powerful, and the most complex, feature of Pachylet. A smart folder is a real folder: you can move messages into or out of a smart folder just as you can with a normal folder. But a smart folder also has an associated query, that's saved permanently with your Pachylet data.
The most common use of a smart folder is to pre-sort or filter your incoming messages. Whenever Pachylet receives new mail, the messages are matched against the queries of your smart folders. When a new message matches a smart folder's query, the message is moved into that folder. The only messages that appear in your Inbox are those that match none of your smart folders' queries.
This would be unhelpful without the "Scan" button on the main screen. This button searches your smart folders sequentially, checking for unread messages. (While you're looking at a folder found by "Scan", the button is relabelled to say "Next Folder" or "End Scan".)
The net effect when new messages arrive is that they get sorted into your smart folders and your Inbox, then the "Scan" button lets you view them sequentially, in this sorted order. The user interface is arranged such that if you click "Scan" and get to a folder that you don't want to read right now, you can ignore it (by clicking the button again, or by doing something else) without disturbing it.
A secondary use of smart folders is to filter your messages. When you create or edit a smart folder, there's an option to mark matching incoming messages as having been read. This means they are ignored by "Scan". For example, you can use this to move bcc copies of messages from yourself into a "Sent" folder that you'll never see unless you explicitly open it.
The final use of smart folders has nothing to do with folders. When you use the "Folders" button to see your folders, in the smart folders section there's a "Find" button. This finds messages matching the selected smart folder's query, regardless of whether they are currently in the folder. It's a way to keep a query that you use frequently, such as "messages dated within the last month".
The "Compose", "Forward", "To Author", and "To All" buttons create a new draft message, in its own window. You edit the draft there, and eventually click "Send" or "Discard".
In a web-based email client, the most recent state of an in-progress draft is held entirely in your web browser. If you want to keep it for later, you need to explicitly click "Save". You can retrieve it later with the "Folders" button, and opening the "Unsent" folder. (I'll fix this when I convert message composition to use Javascript.)
Messages can have attachments. If you want more than one attachment, choose the first one, then click "Save" to upload it. The resulting composition window will then let you add another attachment.
Pachylet includes a contacts database. You can manage this manually by clicking "Contacts" on the main screen, or you can add a name from an incoming message by clicking the "keep" link beside the name. You can add a recipient from your contacts database to a current draft by typing the recipient's first or last name (or both), or the recipient's nickname, into the "to" or "cc" fields. You can also click "Contacts" in the composition window.
If you're using the Safari browser (Mac OS X), you can right-click (control-click) within the text area in the message composition window to enable a spelling checker.
The name "Pachylet" is reminiscent of "Pachyderm", an animal rumoured to never forget your email. See also the Pachyderm web site or a Pachyderm talk, both from 1997.
Pachylet is implemented in Javascript, HTML (4.01), CSS, PHP and mysql. The server side works on Linux or Windows, with Apache or IIS.
The incoming messages are parsed into MIME components (using PHP's built-in POP3 and IMAP support), and the results of the parse get stored in the database. Large MIME components are stored directly in the file system instead. Pachylet uses the MySql full-text index mechanism for its search mechanisms. Audio and video items aren't indexed, and only the first 10K Bytes or so of other items are indexed.
There are two client-side versions. "V1" uses static HTML generated by a server-side script, and "V2" uses dynamic HTML ("DHTML") manipulated by client-side Javacript. The DHTML version communicates with its server-side script using the "XMLHTTPRequest" object, and receives data from the server as XML (a combination of technologies sometimes called "AJAX").
The web pages generated by the static HTML client are very simple, and don't rely on any client-side scripting. They should work on any browser, even with Javascript disabled. They do require CSS support, and they won't work on browsers earlier than IE 4 or Netscape 6.
The DHTML+XML client relies on the use of a fairly modern browser, with Javascript enabled. In exchange for this restriction, the DHTML+XML client can hide most of the latency incurred in communicating with the server, resulting in dramatically better client-side performance. Additionally, the DHTML+XML client transfers much less data from the server, improving performance and cost on slow or pay-per-byte connections.
The DHTML+XML client has been tested with Safari 1.3.1, Internet Explorer 6 (on Windows XP SP2), Firefox 1.5 and Opera 8.51. It uses strict HTML 4.01, with a DTD declaration that makes browsers run in "standards-compliant" mode.
The static HTML client authenticates by shipping the user's plain-text password over an HTTP connection. It should be used only with SSL, to a trusted server certified by X.509. The DHTML+XML client uses cryptography on the client side, sending an HMAC-MD5 authenticator to the server. If you don't mind the possibility of an intruder reading your email in transit, the DHTML+XML client is adequately secure over unencrypted and unauthenticated HTTP connections (which are much faster and cheaper than SSL connections).
Both clients use HTTP directives that should prevent your web browser from caching any pachylet pages, or writing them to the local file system. The DHTML+XML client uses in-memory caching extensively while you are logged in to Pachylet, but discards the caches when you log out.
For educational purposes, you may read the following source files. Note that Pachylet is a copyright work: permission to read the sources does not give you permission to make or distribute copies or derivative works, nor to keep a copy for your own use, nor to execute the scripts.
The DHTML+XML client (about 4800 lines):
Note: the DHTML+XML client currently reverts to using the static HTML client for message composition.
The Static HTML client (about 3200 lines):
Client-independent code (about 3600 lines):