mbox-0.3.1: Read and write standard mailbox files.

Copyright(c) Gershom Bazerman, 2009
LicenseBSD 3 Clause
Maintainergershomb@gmail.com
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell98

Data.MBox.String

Description

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

This parser is written to be a streaming parser. Given a lazy source of data and a streaming consumer, you should be able to analyze arbitrary mbox files in constant space.

Synopsis

Documentation

data Message Source

Constructors

Message 

Fields

fromLine :: String
 
headers :: [Header]
 
body :: String
 

Instances

parseMBox :: String -> MBox Source

Reads a string as an mbox file.

parseForward :: Message -> Message Source

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

parseDateHeader :: String -> Maybe UTCTime Source

Reads a date header as a UTCTime

showMessage :: Message -> String Source

Renders an individual message into a String.

showMBox :: MBox -> String Source

Renders an MBox into a String

isID :: Header -> Bool Source

Header accessors