import { Resend } from "resend" export interface SendEmailOptions { from: string to: string subject: string html: string } export type SendEmailResult = ReturnType export interface EmailOptions { key: string } export class Email { private sendClient: Resend constructor(options: EmailOptions) { const { key } = options this.sendClient = new Resend(key) } async sendEmail(options: SendEmailOptions): Promise { return await this.sendClient.emails.send({ ...options }) } }