2 unstable releases

0.7.0 May 10, 2019
0.6.0 Apr 12, 2019

#43 in Email

26 downloads per month
Used in 2 crates (1 directly)

GPL-3.0 license


An RFC 2822 parser.

Currently, this crate only recognizes the RFC 2822 name-addr and addr-spec productions, i.e., things of the form:

Name (Comment) <email@example.org>



Although the above appear simple to parse, RFC 2822's whitespace and comment rules are rather complex. This crate implements the whole grammar.

As an extension, in addition to ASCII, we also recognize all UTF-8 text.

Further, we also allow dots in the name-addr Name. That is:

Professor Pippy P. Poopypants <pippy@jerome-horwitz.k12.oh.us>

is recognized. But RFC 2822 strictly requires that the name be quoted:

"Professor Pippy P. Poopypants" <pippy@jerome-horwitz.k12.oh.us>

This crate does not (yet) implement the new RFC 5322.


~17K SLoC