module Network.Mail.Postie.Types
( HandlerResponse (..),
Mail (..),
Application,
)
where
import Data.ByteString (ByteString)
import Pipes (Producer)
import Network.Mail.Postie.Address
import Network.Mail.Postie.SessionID (SessionID)
data HandlerResponse
=
Accepted
|
Rejected
data Mail
= Mail
{ Mail -> SessionID
mailSessionID :: SessionID,
Mail -> Maybe ByteString
mailAuth :: Maybe ByteString,
Mail -> Address
mailSender :: Address,
Mail -> [Address]
mailRecipients :: [Address],
Mail -> Producer ByteString IO ()
mailBody :: Producer ByteString IO ()
}
type Application = Mail -> IO HandlerResponse