wire-subsystems-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Wire.EmailSending.SMTP

Synopsis

Documentation

initSMTP :: Logger -> Text -> Maybe PortNumber -> Maybe (Username, Password) -> SMTPConnType -> IO SMTP Source #

Initiate the SMTP connection pool

Throws exceptions when the SMTP server is unreachable, authentication fails, a timeout happens, or on every other network failure.

defaultTimeoutDuration is used as timeout duration for all actions.

sendMailWithDuration :: forall t m. (MonadIO m, TimeUnit t) => t -> Logger -> SMTP -> Mail -> m () Source #

sendMail with configurable timeout duration

This is mostly useful for testing. (We don't want to waste the amount of defaultTimeoutDuration in tests with waiting.)

initSMTP' :: TimeUnit t => t -> Logger -> Text -> Maybe PortNumber -> Maybe (Username, Password) -> SMTPConnType -> IO SMTP Source #

initSMTP with configurable timeout duration

This is mostly useful for testing. (We don't want to waste the amount of defaultTimeoutDuration in tests with waiting.)

data SMTP Source #

Constructors

SMTP 

Fields

newtype Username Source #

Constructors

Username Text 

newtype Password Source #

Constructors

Password Text