diff options
Diffstat (limited to 'src/SendMail.hs')
-rw-r--r-- | src/SendMail.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/SendMail.hs b/src/SendMail.hs index 23b1b80..0e1f91d 100644 --- a/src/SendMail.hs +++ b/src/SendMail.hs @@ -5,12 +5,25 @@ module SendMail ) where import Data.Text (Text) +import qualified Data.Text as T import Data.Text.Lazy (fromStrict) import Network.Mail.Mime +import Logger + sendMail :: Text -> Text -> Text -> Text -> IO () sendMail to from subject body = do + Logger.info $ + T.concat + [ "Sending mail to " + , to + , " with subject “" + , subject + , "” and body “" + , body + , "”" + ] renderSendMail (simpleMail' (address to) (address from) subject (fromStrict body)) address :: Text -> Address |