This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
Mathematica Import/Export Format

MBOX (.mbox, .mbx)

Unix mailbox format.
Holds a collection of electronic mail messages.
Native archive format of email clients such as Unix mail, Eudora, Mozilla, Netscape, and Thunderbird.
ASCII format.
Stores mailbox messages in their original format, with individual messages concatenated and separated by an empty line.
May contain binary attachment files using an ASCII representation.
Email applications normally use improved versions of the original Unix mbox format.
  • Import supports all common variants of the mbox file format.
  • Import["file.mbox"] imports an mbox file, returning the entire contents as rules.
  • Import["file.mbox"] returns an expression of the form {msg1, msg2, ...}, giving the individual mail messages msgi in the form {"From" -> str1, "To" -> str2, ...}.
  • Import["file.mbox", elem] imports the specified element from an mbox file.
  • Import["file.mbox", {elem, suba, subb, ...}] imports a subelement.
  • Import["file.mbox", {{elem1, elem2, ...}}] imports multiple elements.
  • The import format can be specified with Import["file", "MBOX"] or Import["file", {"MBOX", elem, ...}].
  • See Import for full general information.
"Elements" list of elements and options available in this file
"Rules"full list of rules for each element and option
"Options"list of rules for options, properties and settings
  • Data representation elements:
"Messages"list of mail messages, each given as rules representing the full header information, the message body, and possible attachments
"From"sender address
"ReplyTo"suggested address to which replies should be sent
"To"addresses of primary recipients
"Cc"addresses of other recipients
"Subject"message subject
"Date"message date, given as a DateList specification
"Data"message body
"Attachments"list of attachments, imported as a Mathematica expression if possible
"RawAttachments"list of attachments given as raw strings
"RawData"list of messages as they appear in the mbox file
"EmailClient"email application used by the sender
"MIMEVersion"version of MIME protocol used if message is MIME formatted
  • Import by default uses the "Messages" element.
  • General option:
CharacterEncoding"ISOLatin1"raw character encoding used in the file