Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RFC 2822 email address parsing - any good list of test cases?

I'm developing an RFC 2822 address parser (not a validator), and was wondering if anyone knew of a good list of test cases that exercises corner cases that might crop up? The specification of the address format is quite complex, and I'm not convinced I understand it fully enough to be certain of identifying all of the odd cases that could crop up.

For the sake of clarity, I'm talking about addresses as they might appear in header lines, so stuff like comments in odd places is the kind of issue I'm thinking about.

like image 684
Jules Avatar asked Oct 18 '25 06:10

Jules


2 Answers

I found this during my quest for the same:

http://isemail.info/_system/is_email/test/?all

Hope this helps.

like image 79
Aman Deep Gautam Avatar answered Oct 20 '25 08:10

Aman Deep Gautam


I had found a blog post over on the MSDN blogs that provides a few test cases specific to RFC2822. I'm not certain it is the definitive list of test cases, but it might be a good starting point.

Email Address test cases

like image 33
Justin Pearce Avatar answered Oct 20 '25 08:10

Justin Pearce



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!