Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data SMTPRaw = SMTPRaw {
- smtpPush :: ByteString -> IO ()
- smtpPull :: IO ByteString
- smtpClose :: IO ()
- smtpHandle :: Handle
- smtpConnect :: String -> Int -> IO (SMTPRaw, Maybe Greeting)
- smtpSendCommand :: SMTPRaw -> Command -> IO ()
- smtpSendCommandAndWait :: SMTPRaw -> Command -> IO (Maybe [ReplyLine])
- smtpSendRaw :: SMTPRaw -> ByteString -> IO ()
- smtpGetReplyLines :: SMTPRaw -> IO (Maybe [ReplyLine])
- smtpDisconnect :: SMTPRaw -> IO ()
Documentation
An SMTPRaw has arbitrary pushpullclose methods, and ALWAYS a Handle, but that Handle is not assumed to be the direct means by which we push pull or close. This is for STARTTLS support.
SMTPRaw | |
|
smtpConnect :: String -> Int -> IO (SMTPRaw, Maybe Greeting) Source
Try to open an SMTPRaw, taking the server greeting as well. No exception handling is performed.
smtpSendCommand :: SMTPRaw -> Command -> IO () Source
Send an SMTP command. No exception handling is performed.
smtpSendCommandAndWait :: SMTPRaw -> Command -> IO (Maybe [ReplyLine]) Source
Send an SMTP command and wait for the reply. You get Nothing in case the reply does not parse. No exception handling is performed.
smtpSendRaw :: SMTPRaw -> ByteString -> IO () Source
Send a raw byte string. Use with care. No exception handling is performed.
smtpGetReplyLines :: SMTPRaw -> IO (Maybe [ReplyLine]) Source
Try to read ReplyLines from the SMTPRaw. No exception handling is performed.
smtpDisconnect :: SMTPRaw -> IO () Source
Close an SMTPRaw handle Be sure not to use the SMTPHandle after this.