import type { Attachment } from "./interface.js"; export interface BuildMimeOptions { from?: string; to: string[]; subject: string; body: string; cc?: string[]; bcc?: string[]; replyTo?: string; inReplyTo?: string; references?: string; html?: boolean; attachments?: Attachment[]; } /** * Encode the display names in an address header (To/Cc/Bcc/From/Reply-To). * * The address itself must stay literal, so this cannot reuse encodeHeaderValue * on the whole string. Only the phrase before is encoded, and only when * it needs it. Without this, a name like "Administración" goes out as raw UTF-8 * and relays that read the bytes as Latin-1 re-encode it, so the recipient sees * "Administración" or worse. Subject was already handled; these were not. */ export declare function encodeAddressList(list: string): string; /** * RFC 5322 Date header in the sender's own local time. * * Without this the provider stamps the Date itself, and Gmail has been * observed writing US offsets for a sender in Europe/Lisbon, with two * messages forty minutes apart carrying -0500 and -0400. Recipients then * read the wrong send time, which matters whenever an email is used as * evidence of when something was sent. */ export declare function rfc5322Date(d?: Date): string; /** Build a raw RFC 2822 message as a Buffer, with optional multipart/mixed attachments. */ export declare function buildRawMimeMessage(opts: BuildMimeOptions): Buffer;