smtp-mail-ng-0.1.0.0: An SMTP client EDSL

Safe HaskellNone
LanguageHaskell2010

Network.Mail.SMTP.SMTPRaw

Description

 

Synopsis

Documentation

data SMTPRaw Source

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.

Constructors

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.