backend/types/config/mailer.ts
creations 00a7417936
Some checks failed
Code quality checks / biome (push) Failing after 13s
move environment to src/environment add smtp env vars, move some other items
2025-06-10 15:16:31 -04:00

42 lines
803 B
TypeScript

type MailerConfig = {
address: string;
port: number;
from: string;
username: string;
password: string;
secure: boolean;
pool: boolean;
connectionTimeout: number;
socketTimeout: number;
maxConnections: number;
maxMessages: number;
replyTo: string;
};
type EmailOptions = {
to: string | string[];
subject: string;
text?: string;
html?: string;
from?: string;
replyTo?: string;
cc?: string | string[];
bcc?: string | string[];
attachments?: EmailAttachment[];
};
type EmailAttachment = {
filename: string;
content?: Buffer | string;
path?: string;
contentType?: string;
cid?: string; // content-ID for embedded images
};
type EmailResult = {
success: boolean;
messageId?: string;
error?: string;
};
export type { MailerConfig, EmailOptions, EmailAttachment, EmailResult };