Skip to content

Commit

Permalink
feat: send linked templates
Browse files Browse the repository at this point in the history
Removed await from send method call, added link template support.
  • Loading branch information
schettn committed Mar 13, 2024
1 parent 8c52c46 commit e613798
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 21 deletions.
68 changes: 49 additions & 19 deletions .pylon/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .pylon/index.js.map

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion src/services/mail-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,14 @@ export class MailFactory {
},
});

await MailFactory.send(senderEmail, envelope, body, bodyHTML);
MailFactory.send(senderEmail, envelope, body, bodyHTML);

// Call links
const links = (await emailTemplate.links()).nodes;

for (const link of links) {
await MailFactory.sendTemplateMail(link.id, values);
}

return "Mail scheduled successfully";
}
Expand Down

0 comments on commit e613798

Please sign in to comment.