Permalink
Browse files

Use $SENDMAIL from the environment, if provided.

Addresses issue #34.
  • Loading branch information...
drewr committed Jun 28, 2013
1 parent 68e484a commit 72c6f46dab914d4bbdf43b38d318aca22d2349b5
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/postal/sendmail.clj
View
@@ -56,7 +56,9 @@
:message message}))
(defn sendmail-find []
- (first (filter #(.isFile (java.io.File. ^String %)) sendmails)))
+ (if-let [SENDMAIL (System/getenv "SENDMAIL")]
+ SENDMAIL
+ (first (filter #(.isFile (java.io.File. ^String %)) sendmails))))
(defn sanitize [^String text]
(.replaceAll text "\r\n" (System/getProperty "line.separator")))

0 comments on commit 72c6f46

Please sign in to comment.