File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -35,25 +35,27 @@ export class EmailService {
3535 } ,
3636 } ) ;
3737
38- /* const createdEmails = */
39- await Promise . all (
38+ const createdEmails = await Promise . all (
4039 interns . map ( ( i ) => this . createEmailForIntern ( i , subject , text ) ) ,
4140 ) ;
4241
4342 const template = nunjucks . compile ( text ) ;
4443
4544 return Promise . allSettled (
4645 interns . map ( ( intern ) => {
47- /* const emailId = createdEmails.find(
46+ const emailId = createdEmails . find (
4847 ( email ) => email . internId === intern . id ,
4948 ) . id ;
50- const trackImage = `<img src="https://internship.dump.hr/api/email/logo?emailId=${emailId}" width="1" height="1" style="display:none" />`; */
51-
49+ const trackImage = `<img src="https://internship.dump.hr/api/email/logo?emailId=${ emailId } " width="1" height="1" style="display:none" />` ;
5250 return this . postmark . sendEmail ( {
5351 From : 'info@dump.hr' ,
5452 To : intern . email ,
5553 Subject : subject ,
56- /* HtmlBody: `${template.render({ intern })} ${trackImage}`, */
54+ HtmlBody : `<pre style="font-family: Calibri; white-space:pre-wrap;">${ template . render (
55+ {
56+ intern,
57+ } ,
58+ ) } </pre> ${ trackImage } `,
5759 TextBody : `${ template . render ( { intern } ) } ` ,
5860 MessageStream : 'outbound' ,
5961 } ) ;
You can’t perform that action at this time.
0 commit comments