Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
70 lines (46 sloc) 1.95 KB


clojure-postmark lets you talk Postmark from Clojure.


Slap this in your project.clj :dependencies:

[postmark "1.0.0"]


First you need to load the postmark function:

;; In an (ns)
(:use [postmark.core :only (postmark)])

;; Outside an (ns)
(use '[postmark.core :only (postmark)])

Create a customized postmark function:

(def pm (postmark "YOUR_API_KEY" ""))

Now just call the function to send an email:

(pm {:to ""
     :subject "Your Noms"
     :text "I wants them."})

You can send to multiple addresses by using a seq for :to, but remember that Postmark's API won't let you send to more than twenty recipients at a time:

(pm {:to ["" ""]
     :subject "All of Your Noms"
     :text "I wants them."})

There are a few other keys you can use in the map you pass to the call:

(pm {:to ["" ""]
     :cc [""]
     :bcc [""]
     :subject "All of Your Noms"
     :text "I wants them."
     :html "I <b>wants</b> them."
     :tag "Noms"
     :reply-to ""})


If you just want to run a test you can use postmark-test without an API key instead of postmark:

(use '[postmark.core :only (postmark-test)])
(def pt (postmark-test ""))

(pt {:to ["" ""]
     :subject "Testing"
     :text "I might want your noms."})

Todo List

  • Automatically generate plain text body if you just pass an html body.
Jump to Line
Something went wrong with that request. Please try again.