diff options
| author | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2010-04-19 14:45:23 -0400 |
|---|---|---|
| committer | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2010-04-19 14:45:23 -0400 |
| commit | ad7dbd7c4ea18502c66bf5a412758f9a52efaedb (patch) | |
| tree | 047487cbbf366f2c306f03cacaa0e8b51edca2db /src/email.clj | |
| parent | 96b5da4e18cfde412103f8ceb129713ef49b632e (diff) | |
| parent | 73130a732df811e55a96ba38c11c0cb0f6090a8e (diff) | |
Merge branch 'master' of /pichat/repo
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))) |
