786c1c2ba3
Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Co-authored-by: Peer Richelsen <peer@cal.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
25 lines
725 B
TypeScript
25 lines
725 B
TypeScript
import { APP_NAME } from "@calcom/lib/constants";
|
|
|
|
import { renderEmail } from "../";
|
|
import type { MonthlyDigestEmailData } from "../src/templates/MonthlyDigestEmail";
|
|
import BaseEmail from "./_base-email";
|
|
|
|
export default class MonthlyDigestEmail extends BaseEmail {
|
|
eventData: MonthlyDigestEmailData;
|
|
|
|
constructor(eventData: MonthlyDigestEmailData) {
|
|
super();
|
|
this.eventData = eventData;
|
|
}
|
|
|
|
protected getNodeMailerPayload(): Record<string, unknown> {
|
|
return {
|
|
from: `${APP_NAME} <${this.getMailerOptions().from}>`,
|
|
to: this.eventData.admin.email,
|
|
subject: `${APP_NAME}: Your monthly digest`,
|
|
html: renderEmail("MonthlyDigestEmail", this.eventData),
|
|
text: "",
|
|
};
|
|
}
|
|
}
|