mbox-0.2: Read and write standard mailbox files.

Stabilityexperimental
Maintainergershomb@gmail.com
Safe HaskellNone

Data.MBox

Description

Reads and writes mboxrd files as per http://www.qmail.org/man/man5/mbox.html.

Synopsis

Documentation

data Message Source

Constructors

Message 

Fields

fromLine :: Text
 
headers :: [Header]
 
body :: Text
 

Instances

parseMBox :: Text -> MBoxSource

Parses Text as an mbox file.

parseForward :: Message -> MessageSource

Attempts to retrieve the contents of a forwarded message from an enclosing message.

parseDateHeader :: Text -> Maybe UTCTimeSource

Reads a date header as a UTCTime

showMessage :: Message -> TextSource

Renders an individual message into Text.

showMBox :: MBox -> TextSource

Renders an MBox into Text

getHeader :: (Header -> Bool) -> Message -> TextSource

Return the values of headers for which predicate is True

isID :: Header -> BoolSource

Return True if header is a Message-ID header.

isDate :: Header -> BoolSource

Return True if header is a Date header.