mirror of
https://github.com/docmost/docmost.git
synced 2025-11-23 09:11:08 +10:00
email integration
* Nest email module with smtp, postmark and console log drivers * react-email package
This commit is contained in:
1
apps/server/src/integrations/mail/interfaces/index.ts
Normal file
1
apps/server/src/integrations/mail/interfaces/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './mail.interface';
|
||||
@ -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[];
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
export interface MailMessage {
|
||||
from: string;
|
||||
to: string;
|
||||
subject: string;
|
||||
text?: string;
|
||||
html?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user