A Rust library for parsing MIME email messages with real-world data compatibility.
Mailparse is a Rust library for parsing MIME email messages. It provides structured access to email headers, body content, and multipart components, handling real-world email data commonly found in IMAP FETCH commands or Maildir storage.
Rust developers building email processing applications, such as email clients, servers, or tools that need to parse and analyze MIME-formatted email messages from sources like IMAP or Maildir.
Developers choose mailparse for its practical handling of real-world email data, including leniency with line delimiters (accepting \n instead of strict RFC-mandated \r\n), making it robust for production use cases over strict RFC adherence.
Rust library to parse mail files
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The parse_mail function provides a straightforward entry point for parsing raw email data into structured ParsedMail objects, reducing boilerplate code.
Accepts messages with \n line delimiters instead of strict RFC-mandated \r\n, making it compatible with common email sources like IMAP FETCH or Maildir, as stated in the README.
Prioritizes practical handling of real-world email data over strict RFC adherence, ensuring robustness for use cases like email processing from IMAP servers.
Comprehensive rustdoc documentation is available on docs.rs, and the README includes clear example usage for parsing multipart emails with encodings.
Does not support email generation, sending, or advanced manipulation features, which may require integrating additional libraries for full email handling.
The library may not follow all strict RFC requirements, as admitted in the README, which could lead to accepting malformed emails in validation-sensitive applications.
Parses entire messages into memory at once, which might cause performance issues or high memory usage when processing very large or deeply nested multipart emails.