import { EntityDict } from '../oak-app-domain'; import { BRC } from '../types/RuntimeCxt'; import nodemailer from 'nodemailer'; export type EmailOptions = { host?: string; port?: number; secure?: boolean; account?: string; password?: string; from?: string; to?: string; subject?: string; text?: string; html?: string; attachments?: nodemailer.SendMailOptions['attachments']; }; /** * 邮箱发送 */ export default interface Email { name: string; sendEmail(options: EmailOptions, context: BRC): Promise<{ success: boolean; error?: string; }>; }