jstedfast / MimeKit

A .NET MIME creation and parser library with support for S/MIME, PGP, DKIM, TNEF and Unix mbox spools.
http://www.mimekit.net
MIT License
1.79k stars 360 forks source link

MimeKit is parsing address as `GroupAddress` instead of `MailboxAddress` #1042

Closed Sharpiro closed 1 month ago

Sharpiro commented 1 month ago

Describe the bug

MimeKit is parsing the following as a GroupAddress instead of a MailboxAddress:

From: First Last [COMPANY/ AREA:] <user@email.com>

I think it is not liking the colon in the brackets, though Outlook sees this as a valid format.

Platform (please complete the following information):

To Reproduce

Expected behavior

MimeKit should parse the address as a MailboxAddress

jstedfast commented 1 month ago

The problem is that syntactically, it is a GroupAddress. Bare colons aren't allowed in the name component of a mailbox address according to the specifications. I'm not sure I can "fix" this without breaking support for group addresses :(

Sharpiro commented 1 month ago

I see. If the format is indeed invalid I can just handle this at a higher level. Thanks.