oak-general-business/lib/types/Email.d.ts

24 lines
519 B
TypeScript

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