import { BaseChannel } from './index'; /** * Email Channel — v1.0.0 * * Supports two modes: * - webhook: Receives emails via HTTP POST (works with email forwarding services) * - imap: TODO - Full IMAP polling (complex, requires raw socket IMAP protocol) * * Sends via SMTP with STARTTLS support using Node.js built-in tls module. * No external dependencies (no nodemailer). */ export interface EmailChannelConfig { /** Mode: 'webhook' (recommended) or 'imap' (TODO) */ mode?: 'webhook' | 'imap'; smtp?: { host: string; port: number; user: string; pass: string; from?: string; }; imap?: { host: string; port: number; user: string; password: string; tls?: boolean; mailbox?: string; pollInterval?: number; }; /** Webhook server port (default: 8082) */ webhookPort?: number; /** Filter: only process emails from these addresses */ filters?: { from?: string[]; subject?: string[]; }; } export interface EmailMessage { messageId: string; from: string; to: string[]; cc?: string[]; subject: string; body: string; html?: string; date: Date; inReplyTo?: string; references?: string[]; threadId?: string; } export declare class EmailChannel extends BaseChannel { type: string; private config; private server; private processedIds; constructor(config: EmailChannelConfig); start(): Promise; stop(): Promise; /** Start webhook HTTP server */ private startWebhook; /** Parse webhook payload into EmailMessage */ static parseWebhookPayload(payload: any): EmailMessage | null; /** Convert email to internal Message */ private emailToMessage; /** Check if email matches configured filters */ matchesFilters(email: EmailMessage): boolean; /** Send email via SMTP with STARTTLS */ sendEmail(to: string, subject: string, body: string, inReplyTo?: string): Promise; /** Raw SMTP send with STARTTLS */ private smtpSend; /** Read request body */ private readBody; } //# sourceMappingURL=email.d.ts.map