|Availabile||2.0 – present|
Message is the framework that manages mail messages.
Structure of Email messages storage
Email messages are mainly stored in the SQLite3 database ~/Library/Mail/Envelope Index (or anything returned in -[MailMessageLibrary defaultDatabasePath]), and supplemented by the file hierarchy in this directory. The correct database will be used only when you login as mobile.
The database has 6 tables, the main 3 are mailboxes, messages and message_data.
Mailboxes are email-storing "folders" in an account. Each mailbox has an associated URL like imap://[email protected]/INBOX and as://[email protected]/uuid/Mail:DEFAULT. The database records only the number of total, unread and deleted downloaded messages.
Messages are the actual emails. The metadata are stored in the messages and the actual messages themselves are in message_data, and if they're too big, the file system.