cl-ses
cl-ses copied to clipboard
Send emails from Common Lisp with AWS SES
#+TITLE: cl-ses #+Author: Cody Reichert #+Email: [email protected] #+DESCRIPTION: Send emails from Common Lisp with AWS's SES
cl-ses is a Common Lisp package for sending email with AWS's SES.
-
Usage cl-ses exports the =send-email= function:
#+BEGIN_SRC lisp (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") #+END_SRC
=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:
#+BEGIN_SRC lisp (cl-ses:send-email ... ... :content-type "text/html" ...) #+END_SRC
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:
#+BEGIN_SRC lisp (cl-ses:send-email ... :to "[email protected],[email protected]" ... ...) #+END_SRC
** 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):
#+BEGIN_SRC lisp (cl-ses:send-email :from "My Name [email protected]" ... ...) #+END_SRC
-
Dependencies
- [[http://weitz.de/drakma/][Drakma]] is the only external dependency
-
Installation *** With Qi Add it another system's qi.yaml, or load it directly:
#+BEGIN_SRC lisp (load "cl-ses.asd") (qi:install :cl-ses) #+END_SRC
*** With Quicklisp Install to local-projects, then it's quickloadable:
#+BEGIN_SRC sh
git clone [email protected]:CodyReichert/cl-ses ~/quicklisp/local-projects
#+END_SRC
#+BEGIN_SRC lisp
(ql:quickload :cl-ses)
#+END_SRC
- Author
- Cody Reichert ([email protected])
- Copyright
Copyright (c) 2015 Cody Reichert ([email protected])