feat: expose email address in email templates
This commit is contained in:
@@ -10,11 +10,16 @@ export const worker = new Worker(
|
||||
async (job) => {
|
||||
const { email, subject, template, params } = job.data;
|
||||
|
||||
const emailTemplateParams = {
|
||||
...params,
|
||||
email,
|
||||
}
|
||||
|
||||
await mailer.sendMail({
|
||||
to: email,
|
||||
from: appConfig.fromEmail,
|
||||
subject: subject,
|
||||
html: compileEmail(template, params),
|
||||
html: compileEmail(template, emailTemplateParams),
|
||||
});
|
||||
},
|
||||
{ connection: redisConfig }
|
||||
|
Reference in New Issue
Block a user