linted
This commit is contained in:
parent
51f618309d
commit
c8b4531513
1 changed files with 7 additions and 5 deletions
12
src/Util.hs
12
src/Util.hs
|
@ -63,7 +63,7 @@ sendUserNotification recipient subject message =
|
||||||
, mailTo =
|
, mailTo =
|
||||||
[ Address
|
[ Address
|
||||||
(Just $ userDetailsIdent recipient)
|
(Just $ userDetailsIdent recipient)
|
||||||
(email)
|
email
|
||||||
]
|
]
|
||||||
, mailCc = []
|
, mailCc = []
|
||||||
, mailBcc = []
|
, mailBcc = []
|
||||||
|
@ -90,12 +90,14 @@ sendAdminNotification subject message =
|
||||||
-- TODO: Grab administrators from settings and actually send the mails to them
|
-- TODO: Grab administrators from settings and actually send the mails to them
|
||||||
return ()
|
return ()
|
||||||
|
|
||||||
|
sendNotification :: Mail -> MateHandler ()
|
||||||
sendNotification mail = do
|
sendNotification mail = do
|
||||||
sendmail <- asks rsSendmailPath
|
sendmailPath <- asks rsSendmailPath
|
||||||
liftIO $ do
|
liftIO $ do
|
||||||
existence <- doesFileExist sendmail
|
existence <- doesFileExist sendmailPath
|
||||||
if existence
|
if existence
|
||||||
then
|
then
|
||||||
renderSendMailCustom sendmail [] mail
|
renderSendMailCustom sendmailPath [] mail
|
||||||
else
|
else
|
||||||
print "Warning: sending notification failed: Sendmail not present!"
|
print ("Warning: sending notification failed: Sendmail not present!"
|
||||||
|
:: String)
|
||||||
|
|
Loading…
Reference in a new issue