test(mail): modify sendTestMail to find out how addHtmlMarkdownAlternatives truly works
This commit is contained in:
parent
40cba1ab9b
commit
a6b62674d2
@ -135,7 +135,7 @@ UserAuthModeLDAPChangedToPWHash: You can now log in using your FRADrive-internal
|
||||
AuthPWHashTip: You now need to use the login form labeled "FRADrive login". Please ensure that you have already set a password when you try to log in.
|
||||
PasswordResetEmailIncoming: For security reasons you will receive a link to the page on which you can set and later change your password in a separate email.
|
||||
MailFradrive: FRADrive
|
||||
MailBodyFradrive: is the apron driving licence management app of Fraport AG.
|
||||
MailBodyFradrive: is the apron driver's licence management app of Fraport AG.
|
||||
|
||||
#userRightsUpdate.hs + templates
|
||||
MailSubjectUserRightsUpdate name: Permissions for #{name} changed
|
||||
|
||||
@ -14,6 +14,13 @@ import Handler.Utils.DateTime
|
||||
dispatchJobSendTestEmail :: Email -> MailContext -> JobHandler UniWorX
|
||||
dispatchJobSendTestEmail jEmail jMailContext = JobHandlerException . mailT jMailContext $ do
|
||||
_mailTo .= [Address Nothing jEmail]
|
||||
-- TODO: remove me after the test!
|
||||
addHtmlMarkdownAlternatives $ \(MsgRenderer _mr) -> [shamlet|
|
||||
<h1>
|
||||
Testheader
|
||||
<p>
|
||||
Dieser Abschnitt ist ein Test, ob mehrfache Mailparts ankommen.
|
||||
|]
|
||||
replaceMailHeader "Auto-Submitted" $ Just "auto-generated"
|
||||
setSubjectI MsgMailTestSubject
|
||||
now <- liftIO getCurrentTime
|
||||
@ -21,6 +28,18 @@ dispatchJobSendTestEmail jEmail jMailContext = JobHandlerException . mailT jMail
|
||||
nD <- formatTimeMail SelFormatDate now
|
||||
nT <- formatTimeMail SelFormatTime now
|
||||
addHtmlMarkdownAlternatives $ \(MsgRenderer mr) -> [shamlet|
|
||||
<h2>
|
||||
#{mr MsgMailTestContent}
|
||||
|
||||
<p>
|
||||
#{mr MsgMailTestDateTime}
|
||||
<ul>
|
||||
<li>#{nDT}
|
||||
<li>#{nD}
|
||||
<li>#{nT}
|
||||
|]
|
||||
addHtmlMarkdownAlternatives $ \(MsgRenderer mr) -> [shamlet|
|
||||
<h2>Repetition just for Testing
|
||||
<p>
|
||||
#{mr MsgMailTestContent}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user