2023-06-25 15:30:18 +08:00
|
|
|
export type EmailSend = {
|
|
|
|
|
subject: string;
|
|
|
|
|
receivers: string[];
|
2025-07-15 13:58:01 +08:00
|
|
|
content?: string;
|
|
|
|
|
attachments?: any[];
|
|
|
|
|
html?: string;
|
2023-06-25 15:30:18 +08:00
|
|
|
};
|
|
|
|
|
|
2025-12-14 01:36:20 +08:00
|
|
|
export type EmailSendByTemplateReq = {
|
|
|
|
|
type: string;
|
|
|
|
|
data: any;
|
2025-12-16 22:07:39 +08:00
|
|
|
receivers: string[];
|
|
|
|
|
attachments?: any[];
|
2025-12-14 01:36:20 +08:00
|
|
|
};
|
|
|
|
|
|
2023-06-25 15:30:18 +08:00
|
|
|
export interface IEmailService {
|
|
|
|
|
send(email: EmailSend): Promise<void>;
|
2025-12-14 01:36:20 +08:00
|
|
|
sendByTemplate(req: EmailSendByTemplateReq): Promise<void>;
|
2023-06-25 15:30:18 +08:00
|
|
|
}
|