Extremely basic Clojure wrapper for javax.mail
. Only supports uploading messages at the moment!
Leiningen dependency:
[zsau/mail "0.1.1"]
(def imap {:host "imap.example.com"
:port 993 ; optional (default: protocol-dependent)
:user "nobody"
:password "hunter2"
:protocol "imaps"})] ; optional (default: "imaps")
(def folder {:name "Misc"
:create true}) ; optional (default: false)
(def message {:from "[email protected]" ; alternatively: (address "[email protected]" "John Smith")
:to "[email protected]"
:subject "Hello"
:body "Hello, world!"
:date (java.util.Date.)}) ; optional (default: now)
(with-store [store imap]
(append-messages store folder [message ...])))
Released under the MIT License.