module View.Mail.SignIn
  ( mail
  ) where

import           Data.Text    (Text)

import           Common.Model (User (..))
import qualified Common.Msg   as Msg

import           Conf         (Conf)
import qualified Conf         as Conf
import qualified Model.Mail   as M

mail :: Conf -> User -> Text -> [Text] -> M.Mail
mail conf user url to =
  M.Mail
    { M.from = Conf.noReplyMail conf
    , M.to = to
    , M.subject = Msg.get Msg.SignIn_MailTitle
    , M.body = Msg.get (Msg.SignIn_MailBody (_user_name user) url)
    }