Skip to content

CodyReichert/cl-ses

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Send emails from Common Lisp with AWS SES

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published