ts-mailer
Version:
This lib provide a class and function as singleton instance to compile a hbs template adding data and send it as an email using aws-ses. ## Send email using hbs template and aws-ses
19 lines • 575 B
TypeScript
import { SendEmailCommandOutput } from "@aws-sdk/client-sesv2";
export interface IBaseVariables<T> {
toEmails: string[];
fromEmail: string;
cc?: string[];
bcc?: string[];
subject: string;
templatePath: string;
data?: T;
}
export interface IMailer {
sendEmail<T>(data: IBaseVariables<T>): Promise<SendEmailCommandOutput>;
}
export interface ITemplatesCompiler {
getTemplate(path: string): string;
compileTemplate<T>(hbs: string, variables?: T): string;
exists(path: string): boolean;
}
//# sourceMappingURL=mailer.interface.d.ts.map