Postal-mime
lastmod 2025-01-22created 2025-01-221 edits
Email parsing library for browsers and serverless
Features
- Runs in browser environments (including Web Workers) and serverless functions (such as Cloudflare Email Workers)
- Reads RFC822 email messages and parses them into a structure made of objects such as headers/recipients/attachments
- PostalMime.parse(email, options) -> Promise<ParsedEmail>
- Returns a structured object as a Promise
- Keys/values of all headers
- Name/email address of from, sender
- deliveredTo, returnPath
- to, cc, bcc, replyTo
- messageId, inReplyTo, references
- date : sent date in ISO8601 format
- html
- text
- Attachments : filename, mimeType, disposition, related (true for inline images), contentId, content, encoding
See also
- EmailEngine - made by the open-source team that built access to IMAP/SMTP via a REST API