SMTPClient-0.2: A simple SMTP clientSource codeContentsIndex
Network.SMTP.Client
Synopsis
sendSMTP :: String -> SockAddr -> [Message] -> IO ()
sendSMTP_ :: (String -> IO ()) -> Maybe (IORef Int) -> String -> SockAddr -> [Message] -> IO ()
data SMTPException = SMTPException String
Documentation
sendSMTPSource
:: StringDomain name for EHLO command
-> SockAddrNetwork address of SMTP server
-> [Message]List of messages to send
-> IO ()
Send a list of email messages to an SMTP server. Throws SMTPException on failure at the communication protocol level. The message body may contain either "n" or "\r\n" for an end-of-line marker and in all cases it will be sent correctly to the server.
sendSMTP_Source
:: String -> IO ()Diagnostic log function
-> Maybe (IORef Int)Optional IORef for storing the number of emails successfully sent so far.
-> StringDomain name for EHLO command
-> SockAddrNetwork address of SMTP server
-> [Message]List of messages to send
-> IO ()
Like sendSMTP_ but takes an additional function for logging all input and output for diagnostic purposes. Also an optional IORef for storing the number of emails sent so far. The emails are sent strictly in order, so this count can be used when an exception is caught to mark sent emails.
data SMTPException Source
Constructors
SMTPException String
show/hide Instances
Produced by Haddock version 2.6.0