Last active
December 14, 2015 06:39
-
-
Save jeremyheiler/5044729 to your computer and use it in GitHub Desktop.
Thoughts on configuring an SMTP client.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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