fix mail errors
This commit is contained in:
parent
853d825951
commit
d83041eb3b
1 changed files with 5 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue