sending emails to credit transfer recipients
This commit is contained in:
parent
35ae7833c5
commit
a93cdb937f
1 changed files with 17 additions and 3 deletions
|
@ -88,16 +88,30 @@ transferForm = renderDivs
|
||||||
$ areq currencyField (fieldSettingsLabel MsgValue) (Just 0)
|
$ areq currencyField (fieldSettingsLabel MsgValue) (Just 0)
|
||||||
|
|
||||||
notify :: User -> User -> Int -> App -> IO ()
|
notify :: User -> User -> Int -> App -> IO ()
|
||||||
notify sender recpt amount master = do
|
notify sender rcpt amount master = do
|
||||||
case userEmail sender of
|
case userEmail sender of
|
||||||
Just email ->
|
Just email ->
|
||||||
liftIO $ sendMail email "Guthabentransfer beim Matematen"
|
liftIO $ sendMail email "Guthabentransfer beim Matematen"
|
||||||
[stext|
|
[stext|
|
||||||
Hallo #{userIdent sender}
|
Hallo #{userIdent sender}
|
||||||
|
|
||||||
Du hast gerade #{formatIntCurrency amount}#{appCurrency $ appSettings master} an #{userIdent recpt} transferiert.
|
Du hast gerade #{formatIntCurrency amount}#{appCurrency $ appSettings master} an #{userIdent rcpt} transferiert.
|
||||||
|
|
||||||
Viele Grüßem
|
Viele Grüße,
|
||||||
|
|
||||||
|
Der Matemat
|
||||||
|
|]
|
||||||
|
Nothing ->
|
||||||
|
return ()
|
||||||
|
case userEmail rcpt of
|
||||||
|
Just email ->
|
||||||
|
liftIO $ sendMail email "Guthabentransfer eingetroffen"
|
||||||
|
[stext|
|
||||||
|
Hallo #{userIdent rcpt}
|
||||||
|
|
||||||
|
Du hast gerade #{formatIntCurrency amount}#{appCurrency $ appSettings master} von #{userIdent sender} erhalten.
|
||||||
|
|
||||||
|
Viele Grüße,
|
||||||
|
|
||||||
Der Matemat
|
Der Matemat
|
||||||
|]
|
|]
|
||||||
|
|
Loading…
Reference in a new issue