aboutsummaryrefslogtreecommitdiff
path: root/src/executable/haskell/Service/MailService.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/executable/haskell/Service/MailService.hs')
-rw-r--r--src/executable/haskell/Service/MailService.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/executable/haskell/Service/MailService.hs b/src/executable/haskell/Service/MailService.hs
index cb61c47..3a5bfd0 100644
--- a/src/executable/haskell/Service/MailService.hs
+++ b/src/executable/haskell/Service/MailService.hs
@@ -4,9 +4,9 @@ module Service.MailService
import Control.Arrow (left)
import Control.Exception (SomeException, try)
+import qualified Control.Logging as Logging
import Data.Text (Text)
import qualified Data.Text as T
-import qualified Data.Text.IO as T
import qualified Data.Text.Lazy as LT
import Data.Text.Lazy.Builder (fromText, toLazyText)
import qualified Network.Mail.Mime as Mime
@@ -17,7 +17,7 @@ import qualified Model.Mail as Mail
send :: Bool -> Mail -> IO (Either Text ())
send isMock mail =
if isMock then do
- putStrLn $ "MOCK sending mail " ++ (show mail)
+ Logging.log $ T.concat [ "MOCK sending mail ", T.pack . show $ mail ]
return . Right $ ()
else do
result <-
@@ -25,7 +25,7 @@ send isMock mail =
(try (Mime.renderSendMail . getMimeMail $ mail) :: IO (Either SomeException ()))
case result of
Left err ->
- T.putStrLn . T.concat $
+ Logging.loggingLogger Logging.LevelError "" . T.concat $
[ "Error sending the following email ("
, T.pack . show $ mail
, ":\n"