]> gitweb.michael.orlitzky.com - dead/halcyon.git/blobdiff - src/Mail.hs
Clean up imports.
[dead/halcyon.git] / src / Mail.hs
index db5673f62c84bef2964e2e1cb4fb188ec3d43a49..3f519ccd8f0d0e22714a248a6595af378ca947eb 100644 (file)
@@ -1,17 +1,22 @@
 -- |Email functions and data types.
 
-module Mail
+module Mail (
+  Message(..),
+  default_headers,
+  print_sendmail_result,
+  rfc822_now,
+  sendmail )
 where
 
-import Control.Concurrent
-import Control.Exception (evaluate)
-import Control.Monad (liftM)
-import Data.List (intercalate)
-import Data.Time (formatTime, getZonedTime)
-import System.Exit
-import System.Locale (defaultTimeLocale, rfc822DateFormat)
-import System.Process
-import System.IO (hClose, hGetContents, hPutStr)
+import Control.Concurrent ( forkIO, newEmptyMVar, putMVar, readMVar )
+import Control.Exception ( evaluate )
+import Control.Monad ( liftM )
+import Data.List ( intercalate )
+import Data.Time ( formatTime, getZonedTime )
+import System.Exit ( ExitCode(..) )
+import System.Locale ( defaultTimeLocale, rfc822DateFormat )
+import System.Process ( runInteractiveProcess, waitForProcess )
+import System.IO ( hClose, hGetContents, hPutStr )
 
 
 type Header = String
@@ -50,15 +55,6 @@ instance Show Message where
         else (intercalate "\n" (headers m)) ++ "\n"
 
 
--- |Pad a string on the left with zeros until the entire string has
--- length n.
-pad_left :: String -> Int -> String
-pad_left str n
- | n < (length str) = str
- | otherwise = (replicate num_zeros '0') ++ str
-   where num_zeros = n - (length str)
-
-
 
 -- | Constructs a 'String' in RFC822 date format for the current
 --   date/time.