Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- makeEmail :: String -> [(String, String)] -> Maybe Doc -> Maybe String -> Doc -> Maybe String -> Doc
- readEmail :: ByteString -> ByteString
- formatHeader :: String -> String -> ByteString
- prop_qp_roundtrip :: ByteString -> Bool
Documentation
makeEmail :: String -> [(String, String)] -> Maybe Doc -> Maybe String -> Doc -> Maybe String -> Doc Source #
readEmail :: ByteString -> ByteString Source #
formatHeader :: String -> String -> ByteString Source #
Formats an e-mail header by encoding any non-ascii characters using UTF-8 and Q-encoding, and folding lines at appropriate points. It doesn't do more than that, so the header name and header value should be well-formatted give or take line length and encoding. So no non-ASCII characters within quoted-string, quoted-pair, or atom; no semantically meaningful signs in names; no non-ASCII characters in the header name; etcetera.
prop_qp_roundtrip :: ByteString -> Bool Source #