#README
Welcome to the send-mail Clojure library wiki.
send-mail is a simple Clojure library for sending emails, and is licensed under the Eclipse Public License. The original use case was for sending emails from a noir web app hosted on Heroku. Inspired by this tutorial on Heroku for sending mail from rails apps, and the referenced article on sending email using gmail.
You'll need a gmail account.
(ns your-namespace (:use send-mail)...)
(send-mail "from-email" "to-email" "subject" "message" "from-gmail-passwd")
(send-mail "from-email" "to-email" "subject" "message" "gmail-acct" "gmail-password")
(send-mail "from-email" "to-email" "subject" "message" "host" "port" "server-acct" "server-port" timeout-in-millis)
Examples:
(send-mail "your-from@gmail.com" "destination@localhost" "Website Inquiry" (join \newline (map (fn [[k v]] (format "%s = %s" (name k) v) ) contact)) "s3cr3t")
(send-mail "your-from@gmail.com" ["dest1@localhost" "dest2@localhost"] "Website Inquiry" (join \newline (map (fn [[k v]] (format "%s = %s" (name k) v) ) contact)) "s3cr3t")
The library has been designed for use with gmail initially. It may or may not work with other smtp servers. It is not a full implementation of SMTP, although it uses SMTP.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close