File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ Terveisin / Sincerely Konsti`;
221221 const expectedAcceptedSubject =
222222 "Konstiarvonnan tulos / Results for Konsti lottery signup" ;
223223 const expectedRejectedBody = `Hei ${ mockUser2 . username } !
224- Et valitettavasti päässyt arvonnassa yhteenkaan ohjelmaan johon ilmoittauduit.
224+ Et valitettavasti päässyt arvonnassa yhteenkään ohjelmaan johon ilmoittauduit.
225225
226226Hi Test User 2!
227227Unfortunately you did not get spot on lottery signup.
Original file line number Diff line number Diff line change @@ -87,11 +87,13 @@ async function generateAcceptedEmail(
8787
8888 const subject = getEmailSubjectAccepted ( ) ;
8989 const body = getEmailBodyAccepted ( program . title , notification ) ;
90+ const htmlBody = body . replaceAll ( "\n" , "<br />" ) ;
9091 return {
9192 from : fromAddress ,
9293 to : email ,
9394 subject,
9495 text : body ,
96+ html : `<p>${ htmlBody } </p>` ,
9597 } ;
9698}
9799
@@ -102,10 +104,12 @@ function generateRejectedEmail(
102104) : EmailMessage {
103105 const subject = getEmailSubjectRejected ( ) ;
104106 const body = getEmailBodyRejected ( notification ) ;
107+ const htmlBody = body . replaceAll ( "\n" , "<br />" ) ;
105108 return {
106109 from : fromAddress ,
107110 to : email ,
108111 subject,
109112 text : body ,
113+ html : `<p>${ htmlBody } </p>` ,
110114 } ;
111115}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export function getEmailSubjectAccepted(): string {
2222
2323export function getEmailBodyRejected ( notification : NotificationTask ) : string {
2424 const bodyFi = `Hei ${ notification . username } !
25- Et valitettavasti päässyt arvonnassa yhteenkaan ohjelmaan johon ilmoittauduit.` ;
25+ Et valitettavasti päässyt arvonnassa yhteenkään ohjelmaan johon ilmoittauduit.` ;
2626 const bodyEn = `Hi ${ notification . username } !
2727Unfortunately you did not get spot on lottery signup.` ;
2828 return `${ bodyFi } \n\n${ bodyEn } \n\nTerveisin / Sincerely Konsti` ;
You can’t perform that action at this time.
0 commit comments