ismtp-2.0.0: Advanced ESMTP library

Stabilityexperimental
MaintainerErtugrul Soeylemez <es@ertes.de>

Network.Smtp.Simple

Contents

Description

Higher level interface to ismtp.

Synopsis

Execute sessions

data SendMail Source

Session configuration.

Constructors

SendMail 

Fields

mailBufferSize :: Int

Input buffer size.

mailInputHandle :: Handle

Input handle (e.g. receiving socket).

mailMaxLine :: Int

Maximum line length (flood protection).

mailMaxMessages :: Int

Maximum number of messages (flood protection).

mailOutputHandle :: Handle

Output handle (e.g. sending socket).

mailTimeout :: Int

Receive timeout in milliseconds.

defSendMail :: Handle -> Handle -> SendMailSource

Default values for SendMail with the given input and output handle respectively.

sendMail :: (Applicative m, MonadIO m) => SendMail -> MailT (Either SomeException a) m a -> m (Either SomeException a)Source

Execute the given mail session using the supplied configuration. Please note that both handles must be set to binary mode and the input handle should be unbuffered (NoBuffering).

sendMail_ :: (Applicative m, MonadIO m) => SendMail -> MailT (Either SomeException a) m a -> m aSource

Like sendMail, but throws an exception on error.