From ecd9cf1651b9b06862f64dd95a97349325aa5cca Mon Sep 17 00:00:00 2001 From: "Daniel P. Wright" Date: Wed, 28 Aug 2013 08:14:54 +0900 Subject: [PATCH] Update sample code to use doSMTPSTARTTLS --- examples/gmail.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/gmail.hs b/examples/gmail.hs index fd6e661..3d441eb 100644 --- a/examples/gmail.hs +++ b/examples/gmail.hs @@ -27,11 +27,9 @@ imapTest = do B.putStrLn msgContent logout c -smtpTest = do - c <- connectSMTPSTARTTLS "smtp.gmail.com" +smtpTest = doSMTPSTARTTLS "smtp.gmail.com" $ \c -> do sendCommand c $ AUTH PLAIN username password sendMail username [recipient] mailContent c - closeSMTP c where mailContent = subject `B.append` body subject = "Subject: Test message\r\n\r\n" body = "This is a test message"