UNPKG

safeer-pdf-generator

Version:

Framework-agnostic PDF generation library with chunking, merging, S3 upload, and email delivery

66 lines 1.83 kB
import { EmailSendConfig, EmailResult, EmailSenderAdapter, LoggingAdapter } from '../../types.js'; /** * Default email sender implementation using Nodemailer */ export declare class DefaultEmailSender implements EmailSenderAdapter { private readonly logger; private transporter; constructor(logger?: LoggingAdapter); /** * Initialize transporter (lazy loading to avoid requiring nodemailer) */ private initTransporter; /** * Send PDF email */ send(config: EmailSendConfig, pdfBuffer: Buffer, filename: string, downloadUrl?: string): Promise<EmailResult>; /** * Render email template */ private renderEmailTemplate; /** * Simple template renderer (supports {{variable}} syntax) */ private renderTemplate; /** * Test email configuration */ testConnection(config: EmailSendConfig): Promise<{ success: boolean; error?: string; }>; /** * Send test email */ sendTest(config: EmailSendConfig): Promise<EmailResult>; /** * Get email provider info from SMTP config */ static getProviderInfo(smtpHost: string): { provider: string; defaultPort: number; requiresSSL: boolean; }; } /** * Default email template */ export declare function getDefaultEmailTemplate(): string; /** * Create email sender */ export declare function createEmailSender(logger?: LoggingAdapter): DefaultEmailSender; /** * Test email connection without creating a full EmailSender instance */ export declare function testEmailConnection(config: EmailSendConfig): Promise<{ success: boolean; error?: string; details?: { host: string; port: number; secure: boolean; provider: string; }; }>; //# sourceMappingURL=EmailSender.d.ts.map