email-header-0.4.1: Parsing and rendering of email and MIME headers

Safe HaskellNone
LanguageHaskell98

Network.Email.Header.Pretty

Contents

Description

Formatting and pretty-printing header types.

Synopsis

Combinators

commaSep :: (a -> Doc) -> [a] -> Doc Source #

Separate a group with commas.

Date and time

dateTime :: ZonedTime -> Doc Source #

Format a date and time.

Addresses

address :: Address -> Doc Source #

Format an address.

mailboxList :: [Mailbox] -> Doc Source #

Format a list of Mailboxes.

recipientList :: [Recipient] -> Doc Source #

Format a list of Recipients.

Message IDs

messageID :: MessageID -> Doc Source #

Format a message identifier

messageIDList :: [MessageID] -> Doc Source #

Format a list of message identifiers.

Text

phrase :: Text -> Doc Source #

Format a phrase. The text is encoded as is, unless:

  • The text contains leading or trailing whitespace, or more than one space between words
  • Any word begins with =?
  • Any word contains illegal characters

phraseList :: [Text] -> Doc Source #

Format a list of phrases.

unstructured :: Text -> Doc Source #

Format unstructured text. The text is encoded as is, unless:

  • The text contains leading or trailing whitespace, or more than one space between words
  • Any word begins with =?
  • Any word contains illegal characters

MIME

mimeVersion :: Int -> Int -> Doc Source #

Format the MIME version.

contentType :: MimeType -> Parameters -> Doc Source #

Format the content type and parameters.

contentTransferEncoding :: CI ByteString -> Doc Source #

Format the content transfer encoding.