Skip to content

Files

Latest commit

author
Johannes Staffans
Oct 27, 2017
c6fa1b2 · Oct 27, 2017

History

History
39 lines (28 loc) · 1.07 KB

README.md

File metadata and controls

39 lines (28 loc) · 1.07 KB

ses-mailer

A thin, partial Clojure wrapper around the Amazon SES Java API. I wrote this because I wanted to rely on instance profiles for AWS access control instead of using Postal and having to configure SMTP credentials client-side.

Only the sendEmail method is wrapped at the moment.

Clojars Project

Usage

(send-email client-opts
  "no-reply@company.com"
  "lucky-customer@me.com"
  "You are our millionth customer!"
  {:html-body "<html>Awesome html content</html>"
   :text-body "Boring text content"})

Where client-opts may be:

;; Using the default provider chain falls back to the instance profile
{:provider (DefaultAWSCredentialsProviderChain.)}
;; Or use keys directly
{:access-key "..." :secret-key "..."}
;; The region can also be specified
{:region :eu-west-1}

License

Copyright © 2015-2017 Johannes Staffans

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.