Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Mail client architecture overview

Warning: The content of this article may be out of date. It was imported from mozilla.org and last updated in 2002. All of the links seem to be broken.



This page has been flagged by editors or users as needing technical review. Until it is fully reviewed, it may contain inaccurate or incorrect information.

The mail reader

Gecko (XUL and HTML rendering)
RDF
(dynamic widgets)
JS
(menus, events)
libmime
Mail Datasources
Mail JavaScript
Folder/Message management
msgdb
 
IMAP/NNTP/POP3
Necko
(networking)

Sections in grey refer to modules outside of mail/news

The base Module

The base module provides a generic interface to a set of protocol-independant messaging services. This includes management of accounts, folders and messages.

The base module consists of the following basic building blocks

  • Account Management - The Account Manager is the root object of the server/folder/message hierarchy. It manages individual accounts on mail servers and the identity of users as used to send mail.
  • Folders - Mail folders contain messages and folders. All folders have folder indexes.
  • Messages - Messages are always stored and streamed in RFC822 format. Whenever multiple messages are stored in one file, the berkeley mailbox format is used.
  • Datasources - Datasources are the glue code that reflect mail data such as folders and messages into RDF. RDF will use the datasource to create user interfaces based on this data. Datasources are also used to run commands that operate on this mail data.
  • Events - As data changes throughout the mail application, the event system notifies key components such as datasources and the URL system of these changes.
  • Mail Window Management - Each mail window maintains a certain amount of state to aid in view navigation, progress display, etc.
  • URL display and dispatching - In order to perform network operations such as downloading new mail, copying and moving messages, and displaying messages from a remote server, the URL system interacts with necko and reflects it's state to the mail window.

There are also a number of protocol independant subsystems that have a symbiotic relationship with base:

  • libMIME - for dealing with RFC822 messages and their MIME parts. This library has the cabability to stream messages to an HTML renderer such as Gecko, manage individual parts of messages, and so forth.
  • msgdb - A message database for a given folder is a summary of some of the key attributes in a folder such as the Author and Subject.

Finally, there are larger modules outside of the mail client that are mail-oriented. Most of these modules have little dependancy on the mail reader itself:

  • Compose - The mail compose module is responsible for anything that has to do with sending mail. This includes the mail compose window, creation of RFC822 messages from the data a user has entered, and sending the messages via SMTP.
  • Address book - The address book contains lists of people and all attributes associated with them such as their e-mail address, phone number, etc.

Document Tags and Contributors

 Contributors to this page: chrisdavidmills, ewong, Sheppy, jllogan, jenzed
 Last updated by: chrisdavidmills,