cl-ses is a Common Lisp package for sending email with AWS’s SES.
cl-ses exports the send-email
function:
(cl-ses:send-email :from "[email protected]"
:to "[email protected]"
: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.
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
.
You can specify multiple recipients by using a comma separated list of email addresses:
(cl-ses:send-email ...
:to "[email protected],[email protected]"
...
...)
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 <[email protected]>"
...
...)
- Drakma is the only external dependency
Add it another system’s qi.yaml, or load it directly:
(load "cl-ses.asd")
(qi:install :cl-ses)
Install to local-projects, then it’s quickloadable:
git clone [email protected]:CodyReichert/cl-ses ~/quicklisp/local-projects
(ql:quickload :cl-ses)
- Cody Reichert ([email protected])
Copyright (c) 2015 Cody Reichert ([email protected])