Forked from cljmailgun, mailsling is a simple wrapper around the Mailgun REST API.

:dependencies vector of your project.clj file:
[]
(https://clojars.org/mailsling)
.. and shooting them to selected targets:
(use 'mail.sling)
(def credentials {:domain "app81369673.mailgun.org"}) ; :api-key can also be setWhen credentials are provided via environment variables MAILGUN_API_KEY and
MAILGUN_APP_DOMAIN, with-sling can be skipped, and shootmail can be used
standalone. In this case, credentials provided by environment variables will
be used instead:
(defn shoot-noreply-mail [params]
(shootmail (assoc params :from "[email protected]")))Because sending emails is side-effecty, with-sling can be quite convenient
with multiple email tasks:
(let [params {:subject "work" :text "do this work now!" :to "[email protected]"}]
(with-sling credentials
(shootmail (assoc params :from "[email protected]"))
(shoot-noreply-mail params)))- Omar Yasin Author of cljmailgun
- Carlos Cunha Author of the fork
Copyright (C) 2015 Carlos C. Fontes.
Licensed under the MIT License.