[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36
gwern0
gwern0 at gmail.com
Fri Apr 23 15:22:10 UTC 2010
The following commit has been merged in the master branch:
commit fb9701ea1d9d2c4118686f12da160687079972cf
Author: gwern0 <gwern0 at gmail.com>
Date: Fri Nov 30 12:25:11 2007 +0100
minor -Wall for Network.Email.Sendmail
diff --git a/src/Network/Email/Sendmail.hs b/src/Network/Email/Sendmail.hs
index c3f86fd..d08f702 100644
--- a/src/Network/Email/Sendmail.hs
+++ b/src/Network/Email/Sendmail.hs
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Copyright : Copyright (C) 2004-2005 John Goerzen
License : GNU GPL, version 2 or above
- Maintainer : John Goerzen <jgoerzen at complete.org>
+ Maintainer : John Goerzen <jgoerzen at complete.org>
Stability : provisional
Portability: portable
@@ -45,6 +45,7 @@ import System.Directory
import System.IO
import System.IO.Error
+sendmails :: [String]
sendmails = ["/usr/sbin/sendmail",
"/usr/local/sbin/sendmail",
"/usr/local/bin/sendmail",
@@ -90,12 +91,12 @@ sendmail :: Maybe String -- ^ The envelope from address. If not
-> IO ()
sendmail _ [] _ = fail "sendmail: no recipients specified"
sendmail Nothing recipients msg = sendmail_worker recipients msg
-sendmail (Just from) recipients msg =
+sendmail (Just from) recipients msg =
sendmail_worker (("-f" ++ from) : recipients) msg
-
+
sendmail_worker :: [String] -> String -> IO ()
sendmail_worker args msg =
- let func h = hPutStr h msg
+ let func h = hPutStr h msg
in
do
--pOpen WriteToPipe "/usr/sbin/sendmail" args func
@@ -104,8 +105,8 @@ sendmail_worker args msg =
Right x -> return x
Left _ -> do
sn <- findsendmail
- rv <- pOpen WriteToPipe sn args func
- return $! rv
-
+ r <- pOpen WriteToPipe sn args func
+ return $! r
+
#endif
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list