HaskellNet.SMTP working

1
2
3
4
5
6
7
8
9
= do
  h <- connectSMTPPort serv port
  sendCommand h (EHLO "nschoe")
  sendCommand h (AUTH LOGIN "sfr_address" "sfr_password")
  sendCommand h (MAIL "sfr_address")
  mapM (sendCommand h . RCPT) ["gmail_address", "sfr_addresse"]
  sendCommand h (DATA (B8.pack $ "Subject: This is the subject\nThis is the message body"))
  sendCommand h QUIT
  return ()