diff options
| author | sostler <sbostler@gmail.com> | 2010-04-14 18:52:24 -0400 |
|---|---|---|
| committer | sostler <sbostler@gmail.com> | 2010-04-14 18:52:24 -0400 |
| commit | f0ab9c28ec3cdc0f347081e63e2448750d073d46 (patch) | |
| tree | 03090b6287c75da498f1858877c5bc520f0ef2a6 /src/email.clj | |
| parent | 486946cd5fd8eda8824f1752101fb010c31396d9 (diff) | |
Added muting emails
Diffstat (limited to 'src/email.clj')
| -rw-r--r-- | src/email.clj | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/email.clj b/src/email.clj index dbe60ea..74d6625 100644 --- a/src/email.clj +++ b/src/email.clj @@ -1,6 +1,7 @@ (ns email - (:import org.antlr.stringtemplate.StringTemplateGroup) - (:require [clojure.contrib.str-utils2 :as s])) + (:import org.antlr.stringtemplate.StringTemplateGroup) + (:require [clojure.contrib.str-utils2 :as s]) + (:use utils)) (defn base-mail [& m] (let [mail (apply hash-map m) @@ -65,6 +66,11 @@ :text text :mime (classify-mimetype text))) +(def admins ["opuscule@gmail.com" + "sbostler@gmail.com" + "stfn6000@gmail.com" + "theryderproject@gmail.com"]) + (defn send-registration-email ([nick email] (send-registration-email nick email "welcome")) ([nick email temp] @@ -75,3 +81,10 @@ (let [[s b] (parse-mail-template "reset" {"nick" nick "key" key})] (dump-mail [email] s b))) +(defn send-mute-email [user-nick admin-nick reason time unit] + (let [subject (format "%s was muted by %s for %s %s" + user-nick admin-nick time unit) + body (format "Reason: %s" + reason) + recips (join admins ",")] + (dump-mail [recips] subject body))) |
