-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Simple email sending via SMTP
--   
--   This packages provides a simple interface for mail over SMTP. PLease
--   see the README for more information.
@package smtp-mail
@version 0.3.0.0

module Network.Mail.SMTP.Auth
type UserName = String
type Password = String
data AuthType
PLAIN :: AuthType
LOGIN :: AuthType
CRAM_MD5 :: AuthType
encodeLogin :: UserName -> Password -> (ByteString, ByteString)
auth :: AuthType -> String -> UserName -> Password -> ByteString
instance GHC.Classes.Eq Network.Mail.SMTP.Auth.AuthType
instance GHC.Show.Show Network.Mail.SMTP.Auth.AuthType

module Network.Mail.SMTP.Types
data Command
HELO :: ByteString -> Command
EHLO :: ByteString -> Command
MAIL :: ByteString -> Command
RCPT :: ByteString -> Command
DATA :: ByteString -> Command
EXPN :: ByteString -> Command
VRFY :: ByteString -> Command
HELP :: ByteString -> Command
AUTH :: AuthType -> UserName -> Password -> Command
NOOP :: Command
RSET :: Command
QUIT :: Command
STARTTLS :: Command
type ReplyCode = Int
data Response
Ok :: Response
SystemStatus :: Response
HelpMessage :: Response
ServiceReady :: Response
ServiceClosing :: Response
UserNotLocal :: Response
CannotVerify :: Response
StartMailInput :: Response
ServiceNotAvailable :: Response
MailboxUnavailable :: Response
ErrorInProcessing :: Response
InsufficientSystemStorage :: Response
SyntaxError :: Response
ParameterError :: Response
CommandNotImplemented :: Response
BadSequence :: Response
ParameterNotImplemented :: Response
MailboxUnavailableError :: Response
UserNotLocalError :: Response
ExceededStorage :: Response
MailboxNotAllowed :: Response
TransactionFailed :: Response
type UserName = String
type Password = String
data AuthType
PLAIN :: AuthType
LOGIN :: AuthType
CRAM_MD5 :: AuthType
data () => Address
Address :: Maybe Text -> Text -> Address
[addressName] :: Address -> Maybe Text
[addressEmail] :: Address -> Text
instance GHC.Classes.Eq Network.Mail.SMTP.Types.Command
instance GHC.Show.Show Network.Mail.SMTP.Types.Command
instance GHC.Classes.Eq Network.Mail.SMTP.Types.Response
instance GHC.Show.Show Network.Mail.SMTP.Types.Response

module Network.Mail.SMTP

-- | Connect to an SMTP server, send a Mail, then disconnect. Uses
--   the default port (25).
sendMail :: HostName -> Mail -> IO ()

-- | Connect to an SMTP server, send a Mail, then disconnect.
sendMail' :: HostName -> PortNumber -> Mail -> IO ()

-- | Connect to an SMTP server, login, send a Mail, disconnect. Uses
--   the default port (25).
sendMailWithLogin :: HostName -> UserName -> Password -> Mail -> IO ()

-- | Connect to an SMTP server, login, send a Mail, disconnect.
sendMailWithLogin' :: HostName -> PortNumber -> UserName -> Password -> Mail -> IO ()

-- | Send a Mail with a given sender.
sendMailWithSender :: ByteString -> HostName -> Mail -> IO ()

-- | Send a Mail with a given sender.
sendMailWithSender' :: ByteString -> HostName -> PortNumber -> Mail -> IO ()

-- | Connect to an SMTP server, send a Mail, then disconnect. Uses
--   SMTPS with the default port (465).
sendMailTLS :: HostName -> Mail -> IO ()

-- | Connect to an SMTP server, send a Mail, then disconnect. Uses
--   SMTPS.
sendMailTLS' :: HostName -> PortNumber -> Mail -> IO ()

-- | Connect to an SMTP server, login, send a Mail, disconnect. Uses
--   SMTPS with its default port (465).
sendMailWithLoginTLS :: HostName -> UserName -> Password -> Mail -> IO ()

-- | Connect to an SMTP server, login, send a Mail, disconnect. Uses
--   SMTPS.
sendMailWithLoginTLS' :: HostName -> PortNumber -> UserName -> Password -> Mail -> IO ()

-- | Send a Mail with a given sender. Uses SMTPS with its default
--   port (465).
sendMailWithSenderTLS :: ByteString -> HostName -> Mail -> IO ()

-- | Send a Mail with a given sender. Uses SMTPS.
sendMailWithSenderTLS' :: ByteString -> HostName -> PortNumber -> Mail -> IO ()

-- | Connect to an SMTP server, send a Mail, then disconnect. Uses
--   STARTTLS with the default port (587).
sendMailSTARTTLS :: HostName -> Mail -> IO ()

-- | Connect to an SMTP server, send a Mail, then disconnect. Uses
--   STARTTLS.
sendMailSTARTTLS' :: HostName -> PortNumber -> Mail -> IO ()

-- | Connect to an SMTP server, login, send a Mail, disconnect. Uses
--   STARTTLS with the default port (587).
sendMailWithLoginSTARTTLS :: HostName -> UserName -> Password -> Mail -> IO ()

-- | Connect to an SMTP server, login, send a Mail, disconnect. Uses
--   STARTTLS.
sendMailWithLoginSTARTTLS' :: HostName -> PortNumber -> UserName -> Password -> Mail -> IO ()

-- | Send a Mail with a given sender. Uses STARTTLS with the default
--   port (587).
sendMailWithSenderSTARTTLS :: ByteString -> HostName -> Mail -> IO ()

-- | Send a Mail with a given sender. Uses STARTTLS.
sendMailWithSenderSTARTTLS' :: ByteString -> HostName -> PortNumber -> Mail -> IO ()

-- | A simple interface for generating a Mail with a plantext body
--   and an optional HTML body.
simpleMail :: Address -> [Address] -> [Address] -> [Address] -> Text -> [Part] -> Mail

-- | Construct a plain text Part

-- | Deprecated: Use plainPart from mime-mail package
plainTextPart :: Text -> Part

-- | Construct an html Part

-- | Deprecated: Use htmlPart from mime-mail package
htmlPart :: Text -> Part

-- | Construct a file attachment Part

-- | Deprecated: Use filePart from mime-mail package
filePart :: Text -> FilePath -> IO Part
data SMTPConnection

-- | Send a fully-formed email message via the default sendmail executable
--   with default options.
sendmail :: ByteString -> IO ()

-- | Send a fully-formed email message via the specified sendmail
--   executable with specified options.
sendmailCustom :: FilePath -> [String] -> ByteString -> IO ()

-- | Render an email message and send via the default sendmail executable
--   with default options.
renderSendMail :: Mail -> IO ()

-- | Render an email message and send via the specified sendmail executable
--   with specified options.
renderSendMailCustom :: FilePath -> [String] -> Mail -> IO ()

-- | Connect to an SMTP server with the specified host and default port
--   (25)
connectSMTP :: HostName -> IO SMTPConnection

-- | Connect to an SMTP server with the specified host via SMTPS on port
--   (465). According to RFC 8314 this should be preferred over STARTTLS if
--   the server offers it. If you need a different port number or more
--   sophisticated TLSSettings use
--   connectSMTPWithHostNameAndTlsSettings.
connectSMTPS :: HostName -> IO SMTPConnection

-- | Connect to an SMTP server with the specified host and default port
--   (587). Uses STARTTLS
connectSMTPSTARTTLS :: HostName -> IO SMTPConnection

-- | Connect to an SMTP server with the specified host and port
connectSMTP' :: HostName -> PortNumber -> IO SMTPConnection

-- | Connect to an SMTP server with the specified host and port using TLS
connectSMTPS' :: HostName -> PortNumber -> IO SMTPConnection

-- | Connect to an SMTP server with the specified host and port using
--   STARTTLS
connectSMTPSTARTTLS' :: HostName -> PortNumber -> IO SMTPConnection

-- | Connect to an SMTP server with the specified host and port
connectSMTPWithHostName :: HostName -> PortNumber -> IO String -> IO SMTPConnection

-- | Connect to an SMTP server with the specified host and port and maybe
--   via TLS
connectSMTPWithHostNameAndTlsSettings :: HostName -> PortNumber -> IO String -> Maybe TLSSettings -> IO SMTPConnection

-- | Connect to an SMTP server with the specified host and port using
--   STARTTLS
connectSMTPWithHostNameAndTlsSettingsSTARTTLS :: HostName -> PortNumber -> IO String -> TLSSettings -> IO SMTPConnection

-- | Send a Command to the SMTP server
sendCommand :: SMTPConnection -> Command -> IO (ReplyCode, ByteString)

-- | A convenience function that sends AUTH LOGIN to the
--   server
login :: SMTPConnection -> UserName -> Password -> IO (ReplyCode, ByteString)

-- | Send QUIT and close the connection.
closeSMTP :: SMTPConnection -> IO ()

-- | Render a Mail to a ByteString then send it over the
--   specified SMTPConnection
renderAndSend :: SMTPConnection -> Mail -> IO ()
renderAndSendFrom :: ByteString -> SMTPConnection -> Mail -> IO ()
instance GHC.Classes.Eq Network.Mail.SMTP.SMTPConnection
