-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Preconfigured email connection pool on top of smtp.
--
-- Email helper functions with some sane defaults such as a resource pool
-- and cli support
@package mail-pool
@version 2.3.1
-- | SMTP is s an incredibly stable and well supported protocol. Using this
-- rather then API's prevents vendorlocking.
--
-- This module provides a ready to go connection pool for SMTP. Which has
-- been used in various deployments already.
module Network.Mail.Pool
-- | Send a Mail with help of a connection pool.
sendEmail :: MonadIO m => Pool SMTPConnection -> Mail -> m ()
-- | Construct a connection pool from settings.
smtpPool :: PoolSettings -> IO (Pool SMTPConnection)
-- | Create settings with good defaults from SmtpCred.
defSettings :: SmtpCred -> PoolSettings
-- | Authentication information for the SMTP connection
data SmtpCred
SmtpCred :: String -> String -> String -> PortNumber -> SmtpCred
[_smtpPassword] :: SmtpCred -> String
[_smtpLogin] :: SmtpCred -> String
[_smtpHost] :: SmtpCred -> String
[_smtpPort] :: SmtpCred -> PortNumber
-- | This allows you to override the default settings from
-- defSettings
data PoolSettings
PoolSettings :: SmtpCred -> (SmtpCred -> IO SMTPConnection) -> Double -> Int -> PoolSettings
-- | credentials for smtp connection
[_poolCred] :: PoolSettings -> SmtpCred
-- | allows overriding of the opening function, for example
-- openPlain or openTls
[_poolConnf] :: PoolSettings -> SmtpCred -> IO SMTPConnection
-- | specify how long connections are kept open.
[_poolUnused] :: PoolSettings -> Double
-- | how many connections per stripe.
[_poolStripeMax] :: PoolSettings -> Int
openTls :: SmtpCred -> IO SMTPConnection
openPlain :: SmtpCred -> IO SMTPConnection
openTls' :: Settings -> SmtpCred -> IO SMTPConnection
-- | allows manipulation of the underlying resourcepool config
createPoolConfig :: PoolSettings -> PoolConfig SMTPConnection
emailOptions :: Parser SmtpCred
poolCred :: Lens' PoolSettings SmtpCred
poolConnf :: Lens' PoolSettings (SmtpCred -> IO SMTPConnection)
poolUnused :: Lens' PoolSettings Double
poolStripeMax :: Lens' PoolSettings Int
smtpHost :: Lens' SmtpCred String
smtpLogin :: Lens' SmtpCred String
smtpPassword :: Lens' SmtpCred String
smtpPort :: Lens' SmtpCred PortNumber
-- | Failed to authetnicate with some upstream service (smtp for example)
data ServiceAuthFailure a
instance (Data.Typeable.Internal.Typeable a, GHC.Show.Show a) => GHC.Exception.Type.Exception (Network.Mail.Pool.ServiceAuthFailure a)
instance GHC.Show.Show a => GHC.Show.Show (Network.Mail.Pool.ServiceAuthFailure a)
instance GHC.Show.Show Network.Mail.Pool.SmtpCred
instance Data.Aeson.Types.FromJSON.FromJSON Network.Mail.Pool.SmtpCred