Need help with email-parser?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

156 Stars 9 Forks 169 Commits 4 Opened issues


The fastest and lightest mail parsing Rust library.

Services available


Need anything else?

Contributors list


The fastest and lightest email parsing Rust library!\ This library has no dependency by default (and only a small optional one).


The goal of this library is to be fully compliant with RFC 5322. However, this library does not intend to support the obsolete syntax because it has been obsolete for 12 years, and it would slow down everything.\ This library supports MIME and will support PGP in the future.


let email = Email::parse(
    From: Mubelotix \r\n\
    Subject:Example Email\r\n\
    To: Someone \r\n\
    Message-id: <[email protected]>\r\n\
    Date: 5 May 2003 18:58:34 +0000\r\n\

assert_eq!(email.subject.unwrap(), "Example Email"); assert_eq!(, vec!["Mubelotix"]); assert_eq!(email.sender.address.local_part, "mubelotix"); assert_eq!(email.sender.address.domain, "");

Pay for what you use

Mails can be elaborated. No matter what you are building, you are certainly not using all of its features.\ So why would you pay the parsing cost of header fields you are not using? This library allows you to enable headers you need so that other header values will be parsed as an unstructured header, which is much faster.\ By disabling all header value parsing, this library can parse an entire mail twice faster! But don't worry if you need everything enabled; this library is blazing fast anyway!

Zero-Copy (almost)

This library tries to avoid usage of owned

s as much as possible and is using
instead.\ Thanks to this method, around 90% of the strings are references.


This chart shows the time took to parse a single email.


Run these benchmarks by yourself with

rustup run nightly cargo bench
rustup run nightly cargo bench --no-default-features
.\ Tests require a
file containing a raw mail next to the
.\ Some libraries suffer from huge performance variations depending on the content of the mail, so this library is not always the fastest.

License: MIT

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.