| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
DeliveryHeaders
Description
Add delivery headers to an email message.
Data types
just a newtype to distinguish address from other strings.
... actually, any string at all is considered a valid "time" string we can use.
header utilities
makeReceived :: MailTime -> Maybe Addr -> Addr -> String Source #
make up the "Received:" header, given a time,
a possible "from" address, and a "to" address.
addHeaders :: MailTime -> String -> Maybe Addr -> Addr -> Either String String Source #
add minimal headers: a "Received:" header, a "Date:"
header if we haven't already been given one,
a "From:" field if we haven't already been given one.
string utilities
time utilities
getMailTime :: IO MailTime Source #
get the unix time