Stability | experimental |
---|---|
Maintainer | Ertugrul Soeylemez <es@ertes.de> |
This package provides a monad for fast, incremental ESMTP sessions, with which you can, among other things, send emails. Here is an example session:
mailSession :: ByteString -> ByteString -> ByteString -> Builder -> Mail () mailSession srcDomain fromAddr toAddr content = do waitForWelcome sendHello srcDomain sendMailFrom fromAddr sendRcptTo toAddr sendData content sendQuit
You can use the sendMail
function to send a mail via a domain's MX
server, which is looked up via DNS. Alternatively you can connect to
a specific SMTP server directly by using the sendMailDirect
function. Finally for a low-level interface you can use the
runMail
function.
- module Network.Smtp.Protocol
Reexports
module Network.Smtp.Protocol