fix mail errors

This commit is contained in:
nek0 2022-04-15 20:52:46 +02:00
parent 853d825951
commit d83041eb3b

View file

@ -107,7 +107,8 @@ sendAdminNotification
-> T.Text -- The mail body -> T.Text -- The mail body
-> MateHandler () -> MateHandler ()
sendAdminNotification subject message = do sendAdminNotification subject message = do
allUsers <- userGetAll conn <- asks rsConnection
allUsers <- userDetailsSelectAll conn
admins <- mapM admins <- mapM
(\uid -> checkCapability uid roleCanManageSettings. userDetailsId) (\uid -> checkCapability uid roleCanManageSettings. userDetailsId)
allUsers allUsers
@ -122,7 +123,8 @@ sendAdminNotification subject message = do
] ]
, mailCc = [] , mailCc = []
, mailBcc =[] , mailBcc =[]
, mailHeaders = , mailHeaders = [("Subject", subject)]
, mailParts =
[[ Part [[ Part
{ partType = "text/plain; charset=utf8" { partType = "text/plain; charset=utf8"
, partEncoding = None , partEncoding = None
@ -135,7 +137,7 @@ sendAdminNotification subject message = do
in in
sendNotification mail sendNotification mail
) )
allUsers admins
sendNotification :: Mail -> MateHandler () sendNotification :: Mail -> MateHandler ()
sendNotification mail = do sendNotification mail = do