smtps-gmail-1.1.1: Gmail SMTP Client

Safe HaskellNone
LanguageHaskell2010

Network.Mail.Client.Gmail

Description

A simple SMTP Client for sending Gmail.

Synopsis

Documentation

sendGmail Source

Arguments

:: Text

username

-> Text

password

-> Address

from

-> [Address]

to

-> [Address]

cc

-> [Address]

bcc

-> Text

subject

-> Text

body

-> [FilePath]

attachments

-> Maybe Int

timeout in microseconds

-> IO () 

Send an email from your Gmail account using the simple message transfer protocol with transport layer security. Below is an example using ghci, where Alice sends an Excel spreadsheet to Bob.

>>> :set -XOverloadedStrings
>>> :module Network.Mail.Mime Network.Mail.Client.Gmail
>>> sendGmail "alice" "password" (Address (Just "Alice") "alice@gmail.com") [Address (Just "Bob") "bob@example.com"] [] [] "Excel Spreadsheet" "Hi Bob,\n\nThe Excel spreadsheet is attached.\n\nRegards,\n\nAlice" ["spreadsheet.xls"] Nothing