import type MailMessage from 'nodemailer/lib/mailer/mail-message.js';
/**
 * Extracts the user defined headers (custom headers, "List-" headers,
 * "In-Reply-To", "References", etc.) from a Nodemailer message so they
 * can be forwarded to the API based transports that accept an arbitrary
 * "headers" object (Resend, Brevo).
 *
 * Nodemailer has already serialized every header onto the underlying
 * MimeNode (including the tricky "List-*" formatting), so we read them
 * back instead of re-implementing the serialization. Structural headers
 * that the API derives from the structured payload are skipped, and
 * duplicate keys (e.g. a multi value "List-Unsubscribe") are collapsed
 * into a single comma separated value.
 */
export declare function extractMessageHeaders(mail: MailMessage): Record<string, string> | undefined;
/**
 * Resolves the content of a message attachment to a Buffer. Nodemailer's
 * "resolveContent" reads the attachment regardless of how it was defined
 * (local path, "file://"/"data:"/remote URL, stream or raw buffer), the
 * same way the MIME based transports resolve attachments. This is needed
 * by the JSON based transports (Resend, Brevo) that must send the actual
 * file content as a base64 string instead of forwarding the raw input.
 */
export declare function resolveAttachmentContent(mail: MailMessage, index: number): Promise<Buffer>;
/**
 * Convert a stream to a blob
 */
export declare function streamToBlob(stream: NodeJS.ReadableStream, mimeType: string): Promise<Blob>;
/**
 * Normalize the base URL by removing the trailing slash
 */
export declare function normalizeBaseUrl(baseUrl: string): string;
/**
 * Validate transport config to ensure the "key" and
 * "baseUrl" are present.
 */
export declare function validateConfig(transportName: string, config: {
    key: string;
    baseUrl: string | undefined;
}): void;
