ismtp-3.0.1: Advanced ESMTP library

MaintainerErtugrul Soeylemez <>




High level interfaces for networking.



withMxConn :: (Applicative m, DnsMonad m, MonadPeelIO m) => Domain -> Bool -> MailT a m a -> m aSource

Interface to withSmtpConn, which connects to the first mail exchanger (MX) of the given domain on port 25. The Bool parameter specifies whether to fall back to the given domain itself, if no MX records can be found.

withSmtpConn :: forall a m. (Applicative m, MonadPeelIO m) => HostName -> PortID -> MailT a m a -> m aSource

Connect to the specified SMTP server and run the given computation. Note that there is also withMxConn, which resolves the MX server of the given domain.


withIsmtp :: IO a -> IO aSource

Perform some useful (but not necessarily needed) initialization like disabling SIGPIPE and initializing sockets, run the given computation and then clean up.