AutoTechJobs uses the Resend email service for all email communications, providing a reliable and scalable solution for transactional emails and notifications.
EmailService - Main email service classNotificationService - Handles notificationsEmailTemplateService - Manages email templates&{&{user.name&}&} - User name&{&{job.title&}&} - Job title&{&{company.name&}&} - Company name&{&{verificationUrl&}&} - Verification URLs// In services/email.service.ts
import { Resend } from "resend";
import { EmailTemplateService } from "./email-template.service";
export class EmailService {
private resend: Resend;
private templateService: EmailTemplateService;
constructor() {
this.resend = new Resend(process.env.RESEND_API_KEY);
this.templateService = new EmailTemplateService();
}
async sendJobApplicationNotification(data: JobApplicationData) {
const template = await this.templateService.getTemplate("job-application");
const html = this.templateService.render(template, data);
return this.resend.emails.send({
from: "AutoTechJobs <[email protected]>",
to: [data.recipientEmail],
subject: "New Job Application Received",
html,
});
}
// ... other email methods
}For more information about email configuration and templates, see theConfigurationdocumentation.