A very simple SMTP Client library for sending emails.
- sendStringAsEMail :: String -> String -> SMTPAuthMethod -> String -> String -> String -> String -> String -> String -> PortNumber -> String -> String -> [String] -> IO Bool
- data SMTPAuthMethod
Documentation
:: String | user |
-> String | password |
-> SMTPAuthMethod | the Auth method to use |
-> String | from |
-> String | to |
-> String | subject |
-> String | cc |
-> String | bcc |
-> String | smtp server |
-> PortNumber | smtp port |
-> String | helo domain (also localhost) |
-> String | content |
-> [String] | target recipients |
-> IO Bool | True if the EMAIL is sent |
Send an email using a SMTP email server.
example = do r <- sendStringAsEmail "pippo " -- user "pluto" -- password PlainSMTPAuth -- Auth method "pippo@qwerty.org" -- from "paperina@qwerty.org" -- to "test" -- subject "" -- cc "" -- bcc "mail.qwerty.org" -- stmp_server 25 -- default SMTP port "localhost" -- user domain "This is a test" -- content ["paperina@qwerty.org", -- rcpt_lines "minni@qwery.it.it"] case r of True -> putStrLn "Success" False -> putStrLn "Fail"
data SMTPAuthMethod Source
if True then display debug info
SMTP authorization method