import { E as EmailOptions } from "../packem_shared/types.d-CyiC9uRC.js"; import 'node:buffer'; /** * Parses a raw EML / RFC 5322 MIME message back into {@link EmailOptions}. * * This closes the round-trip story for {@link "../mail".Mail.draft}: serialise a * message to EML, persist/transmit it, then `parseEml()` it back into options you * can hand to `mail.send()`. It understands the multipart layout produced by this * library's own `buildMimeMessage` (text/plain + text/html parts, quoted-printable * and base64 transfer encodings, RFC 2047 encoded headers) and common * single-part messages. * * Scope: it extracts `from`, `to`, `cc`, `bcc`, `replyTo`, `subject`, `text`, * `html`, `priority`, and remaining custom `headers`. Attachment bodies are not * decoded into {@link "../types".Attachment} objects (use a full MIME parser such * as `mailparser` for that); attachment parts are skipped. * @param eml The raw EML/MIME message string. * @returns The parsed email options. * @throws {Error} When the message has no `From` or `To`/`Cc`/`Bcc` recipient and therefore cannot satisfy the required {@link EmailOptions} shape. */ declare const parseEml: (eml: string) => EmailOptions; export { parseEml as default };