ismtp-3.0.1: Advanced ESMTP library

MaintainerErtugrul Soeylemez <es@ertes.de>

Network.Smtp.Session

Contents

Description

SMTP session computations.

Synopsis

Initialization

hello :: forall m r. MonadIO m => ByteString -> MailT r m ()Source

Try EHLO with fallback to HELO.

mailData :: MonadIO m => Enumerator ByteString (MailT r m) () -> MailT r m ()Source

Send the DATA command along with the mail content. Please note that the last line must be properly terminated by CRLF.

mailFrom :: MonadIO m => ByteString -> MailT r m ()Source

Send MAIL FROM command.

quit :: MonadIO m => MailT r m ()Source

Send QUIT command. Please note: This iteratee violates the standard by recognizing a 250 result code as success.

rcptTo :: MonadIO m => ByteString -> MailT r m ()Source

Send RCPT TO command.

reset :: MonadIO m => MailT r m ()Source

Send RSET command.

verify :: MonadIO m => ByteString -> MailT r m BoolSource

Send the VRFY command to find out, whether the mail exchangers knows the given user. Nowadays most mail exchangers disable this command for security reasons.

Please note that many SMTP servers will give you false positives or false negatives to prevent spamming attempts. It is not recommended to use this command.

waitForWelcome :: Monad m => MailT r m ()Source

Wait for the welcome greeting from the SMTP server.