Created
January 15, 2016 19:26
-
-
Save satosystems/4ccbb8845ff463cc5cd4 to your computer and use it in GitHub Desktop.
Network.Mail.Client.Gmail でのメール送信方法 ref: http://qiita.com/satosystems/items/c6c57d6d3b813d3dcb23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
import Network.Mail.Client.Gmail | |
import Network.Mail.Mime | |
main :: IO () | |
main = sendGmail | |
"foo@gmail.com" -- username | |
"password" -- password | |
(Address Nothing "from@example.com") -- from | |
[Address Nothing "to@example.com"] -- to | |
[] -- cc | |
[] -- bcc | |
"Subject" -- subject | |
"body1\nbody2\nbody3\n" -- body | |
[] -- attachments | |
30000000 -- timeout (in microseconds) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment