mirror of
https://github.com/docmost/docmost.git
synced 2025-11-23 19:31:08 +10:00
email integration
* Nest email module with smtp, postmark and console log drivers * react-email package
This commit is contained in:
@ -0,0 +1,30 @@
|
||||
import SMTPTransport from 'nodemailer/lib/smtp-transport';
|
||||
|
||||
export enum MailOption {
|
||||
SMTP = 'smtp',
|
||||
Postmark = 'postmark',
|
||||
Log = 'log',
|
||||
}
|
||||
|
||||
export type MailConfig =
|
||||
| { driver: MailOption.SMTP; config: SMTPConfig }
|
||||
| { driver: MailOption.Postmark; config: PostmarkConfig }
|
||||
| { driver: MailOption.Log; config: LogConfig };
|
||||
|
||||
export interface SMTPConfig extends SMTPTransport.Options {}
|
||||
export interface PostmarkConfig {
|
||||
postmarkToken: string;
|
||||
}
|
||||
export interface LogConfig {}
|
||||
|
||||
export interface MailOptions {
|
||||
mail: MailConfig;
|
||||
}
|
||||
|
||||
export interface MailOptionsFactory {
|
||||
createMailOptions(): Promise<MailConfig> | MailConfig;
|
||||
}
|
||||
|
||||
export interface MailModuleOptions {
|
||||
imports?: any[];
|
||||
}
|
||||
Reference in New Issue
Block a user