ismtp-3.0.1: Advanced ESMTP library

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

Session timeout in milliseconds.

mailTimeoutIO :: Int

Read/write 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 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 be unbuffered. See hSetBuffering and hSetBinaryMode.

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

Like sendMail, but throws an exception on error.