The smtps-gmail
package provides an SMTP client
for sending Gmail. Communications between the client
and server are secured with transport layer security.
You should first get a clone of the smtps-gmail
repository, and then install it from inside the
source directory:
$ git clone https://github.com/enzoh/smtps-gmail
$ cd smtps-gmail
$ cabal install
Below is an example using ghci, where Alice sends an Excel spreadsheet to Bob using the SMTP client.
>>> :set -XOverloadedStrings
>>> :module Network.Mail.Mime Network.Mail.Client.Gmail
>>> sendGmail "alice" "password" (Address (Just "Alice") "[email protected]") [Address (Just "Bob") "[email protected]"] [] [] "Excel Spreadsheet" "Hi Bob,\n\nThe Excel spreadsheet is attached.\n\nRegards,\n\nAlice" ["Spreadsheet.xls"]
Feel free to contact me if you have any questions or comments regarding this package.
Enzo Haussecker <[email protected]>