interface SendEmailOptions { to: string; subject: string; replyTo?: string; html: string; text: string; } interface SendEmailResult { success: boolean; messageId?: string; testMode: boolean; } interface SendCampaignEmailOptions { recipientEmail: string; recipientName?: string; recipientLevel?: string; userEmail: string; userName: string; postalCode: string; subject: string; message: string; campaignTitle: string; } declare class EmailService { private transporter; constructor(); private createTransporter; /** Rebuild transporter from DB settings (with env fallback). Call after SMTP settings change. */ rebuildTransporter(): Promise; testConnection(): Promise; /** * Load template from database (with caching) */ private loadTemplateFromDatabase; /** * Load template - checks database first, falls back to filesystem * @param name Template key (e.g., "campaign-email") * @param type File type (html or txt) - only used for filesystem fallback */ loadTemplate(name: string, type: 'html' | 'txt'): string; /** * Clear database template cache * @param key Optional specific template key to clear. If not provided, clears all. */ clearDatabaseCache(key?: string): void; escapeHtml(unsafe: string): string; /** * Fetch video metadata from Media API */ private getVideoMetadata; processTemplate(template: string, vars: Record, variableDefinitions?: Array<{ key: string; type: string; videoId?: number; }>): Promise; /** * Process text template (for plain text emails) */ processTextTemplate(template: string, vars: Record, variableDefinitions?: Array<{ key: string; type: string; videoId?: number; }>): Promise; /** * Process subject line template * Same as processTemplate but without HTML escaping */ processSubject(subject: string, vars: Record): string; private getFromField; private getOrganizationName; private getEmailTestConfig; sendEmail(options: SendEmailOptions): Promise; sendCampaignEmail(options: SendCampaignEmailOptions): Promise; sendResponseVerification(options: { recipientEmail: string; campaignTitle: string; responseType: string; responseText: string; submitterName: string; verificationUrl: string; reportUrl: string; }): Promise; } export declare const emailService: EmailService; export {}; //# sourceMappingURL=email.service.d.ts.map