Files
quicklanch-server/src/app/queues/email/email.processor.ts
T
abumahid 3f0ead4265 🔧 chore(account): update account module structure and email queue processing
- Enhanced account management with new validation and Swagger documentation.
- Updated Prisma schemas and migrations for the account and profile.
- Improved email handling mechanisms in the email queue system with new worker functionality.
- Adjusted Docker configurations and package dependencies for better integration.
2026-04-03 00:54:46 +06:00

16 lines
510 B
TypeScript

import { otpTemplate } from "../../templates/otpTemplate";
import sendMail from "../../utils/mail_sender";
import { TEmailQueue } from "./email.queue";
// email.processor.ts
export const emailProcessor = async (job: any) => {
const payload: TEmailQueue = job.data;
await sendMail({
to: payload.email as string,
subject: payload.subject,
htmlBody: otpTemplate(payload),
textBody: payload.textBody || "",
name: payload.name,
});
console.log("Sending email job complete:", job.id);
};