Skip to content

Instantly share code, notes, and snippets.

@jeremyheiler
Last active December 14, 2015 06:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremyheiler/5044729 to your computer and use it in GitHub Desktop.
Save jeremyheiler/5044729 to your computer and use it in GitHub Desktop.
Thoughts on configuring an SMTP client.
(require '(lime [smtp :as smtp]))
;; You can define the client yourself.
(def send-mail
(-> (smtp/base-smtp "smtp.gmail.com" 587)
(smtp/with-auth :PLAIN "username" "password")
(smtp/with-starttls)))
;; Perhaps have "batteries included" client that you configure with a map.
(def send-mail (smtp/client {:server-host "smtp.gmail.com"
:server-port 587
:auth {:type :PLAIN
:username "username"
:password "password"}))
;; Regardless, the goal is to be able to do this:
(send-mail {:from "" :to "" :subject "" :body ""})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment