andyedinborough / aenetmail

C# POP/IMAP Mail Client
370 stars 153 forks source link

Make sure the GetMailAddresses function parses DisplayNames containing a comma correctly #126

Closed jvdvleuten closed 11 years ago

jvdvleuten commented 11 years ago

I had a problem where the DisplayName part of an email address contained a comma. I wrote unit tests to ensure the current behavior as well failing unit tests for my scenario. Then I rewrote the GetMailAddresses part. I was wondering why you did something with the ; (semicolon) in your code? Is that part of some spec as I cannot find any examples of email addresses being seperated with semicolons?

In this commit: Renamed GetAddresses to GetMailAddresses Made sure that GetMailAddresses finds correct addresses when the DisplayName part contains a comma. Removed looking for semicolon as I cannot find this in the mail spec and don't have any example mail headers containing semicolons to separate mail addresses.

andyedinborough commented 11 years ago

Oh man, those tests are great. Thanks!

andyedinborough commented 11 years ago

I'm going to see what I can find on semi-colon usage. I don't think I ever saw it in a spec--just only assumed it was possible.

andyedinborough commented 11 years ago

I can't find anything on semicolons in address-lists, so I went ahead and published to Nuget.