Send emails from Common Lisp with AWS SES
Common Lisp
Switch branches/tags
Nothing to show
Clone or download
Latest commit 1f58ebf Jul 7, 2018
Permalink
Failed to load latest commit information.
src add option for email content-type Aug 4, 2015
t initial commit Aug 2, 2015
.gitignore Add qi.yaml file Sep 8, 2015
LICENSE.txt initial commit Aug 2, 2015
README.org Fix typo in README Jul 8, 2018
cl-ses-test.asd initial commit Aug 2, 2015
cl-ses.asd initial commit Aug 2, 2015
qi.yaml Add qi.yaml file Sep 8, 2015

README.org

cl-ses

cl-ses is a Common Lisp package for sending email with AWS’s SES.

Usage

cl-ses exports the send-email function:

(cl-ses:send-email :from "me@example.com"
                   :to "you@example.com"
                   :subject "Hello from CL-SES"
                   :message "The body of the email message"
                   :aws-access-key "XXXXXX"
                   :aws-secret-key "XXXXXXXXXXX")

send-email returns T if the status was 200 (OK), and NIL otherwise. In the future I’ll hopefully have implemented better error reporting.

Setting the Content-Type

There is support for setting the email’s Content-Type. I’ve tested with text/plain and text/html, but others should work as well:

(cl-ses:send-email ...
                   ...
                   :content-type "text/html"
                   ...)

The content-type key is optional, and defaults to text/plain.

Mulitple Recipients

You can specify multiple recipients by using a comma separated list of email addresses:

(cl-ses:send-email ...
                   :to "first@example.com,second@example.com"
                   ...
                   ...)

Setting a name in the from field

This isn’t really AWS Specific, but you can set a “Name” in the from parameter (you still need an email address):

(cl-ses:send-email :from "My Name <me@example.com>"
                   ...
                   ...)

Dependencies

  • Drakma is the only external dependency

Installation

With Qi

Add it another system’s qi.yaml, or load it directly:

(load "cl-ses.asd")
(qi:install :cl-ses)

With Quicklisp

Install to local-projects, then it’s quickloadable:

git clone git@github.com:CodyReichert/cl-ses ~/quicklisp/local-projects
(ql:quickload :cl-ses)

Author

  • Cody Reichert (codyreichert@gmail.com)

Copyright

Copyright (c) 2015 Cody Reichert (codyreichert@gmail.com)