import type { PathLike } from 'fs'; import { Stream } from 'stream'; import type { Readable } from 'stream'; export declare const MIMECHUNK = 76; export declare const MIME64CHUNK: number; export declare const BUFFERSIZE: number; export interface MessageAttachmentHeaders { [index: string]: string | undefined; 'content-type'?: string; 'content-transfer-encoding'?: BufferEncoding | '7bit' | '8bit'; 'content-disposition'?: string; } export interface MessageAttachment { [index: string]: string | boolean | MessageAttachment | MessageAttachment[] | MessageAttachmentHeaders | Readable | PathLike | undefined; name?: string; headers?: MessageAttachmentHeaders; inline?: boolean; alternative?: MessageAttachment | boolean; related?: MessageAttachment[]; data?: string; encoded?: boolean; stream?: Readable; path?: PathLike; type?: string; charset?: string; method?: string; } export interface MessageHeaders { [index: string]: boolean | string | string[] | null | undefined | MessageAttachment | MessageAttachment[]; 'content-type'?: string; 'message-id'?: string; 'return-path'?: string | null; date?: string; from: string | string[]; to: string | string[]; cc?: string | string[]; bcc?: string | string[]; subject: string; text?: string | null; attachment?: MessageAttachment | MessageAttachment[]; } export declare class Message { readonly attachments: MessageAttachment[]; readonly header: Partial; readonly content: string; readonly text?: string; alternative: MessageAttachment | null; constructor(headers: Partial); attach(options: MessageAttachment): this; checkValidity(): { isValid: boolean; validationError: string | undefined; }; valid(callback: (isValid: boolean, invalidReason?: string) => void): void; stream(): MessageStream; read(callback: (err: Error | null, buffer: string) => void): void; readAsync(): Promise; } declare class MessageStream extends Stream { private message; readable: boolean; paused: boolean; buffer: Buffer | null; bufferIndex: number; constructor(message: Message); pause(): void; resume(): void; destroy(): void; destroySoon(): void; } export {};