feat(api): log mailer when sending email (#59065)

This commit is contained in:
Sem Bauke
2025-03-01 12:05:32 +01:00
committed by GitHub
parent 56f9910b0a
commit 99ec728c05
+6 -4
View File
@@ -35,10 +35,12 @@ const plugin: FastifyPluginCallback<{ provider: MailProvider }> = (
)
);
fastify.decorate(
'sendEmail',
async (args: SendEmailArgs) => await provider.send(args)
);
fastify.decorate('sendEmail', async (args: SendEmailArgs) => {
const logger = fastify.log.child({ args });
logger.debug('Sending Email');
return await provider.send(args);
});
done();
};