diff options
Diffstat (limited to 'src/server/View/Mail/SignIn.hs')
-rw-r--r-- | src/server/View/Mail/SignIn.hs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/server/View/Mail/SignIn.hs b/src/server/View/Mail/SignIn.hs index f776ddd..8eaa077 100644 --- a/src/server/View/Mail/SignIn.hs +++ b/src/server/View/Mail/SignIn.hs @@ -1,12 +1,10 @@ {-# LANGUAGE OverloadedStrings #-} module View.Mail.SignIn - ( getMail + ( mail ) where import Data.Text (Text) -import qualified Data.Text.Lazy as LT -import Data.Text.Lazy.Builder (toLazyText, fromText) import Model.Database (User(..)) import qualified Model.Mail as M @@ -16,17 +14,11 @@ import Model.Message import Conf (Conf) import qualified Conf as Conf -getMail :: Conf -> User -> Text -> [Text] -> M.Mail -getMail conf user url to = +mail :: Conf -> User -> Text -> [Text] -> M.Mail +mail conf user url to = M.Mail { M.from = Conf.noReplyMail conf , M.to = to , M.subject = (getMessage SignInMailTitle) - , M.plainBody = plainBody user url + , M.plainBody = getParamMessage [userName user, url] SignInMail } - -plainBody :: User -> Text -> LT.Text -plainBody user url = strictToLazy (getParamMessage [userName user, url] SignInMail) - -strictToLazy :: Text -> LT.Text -strictToLazy = toLazyText . fromText |