-
-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MailboxAddress.Parse throws unexpected ParseException for International Address #536
Comments
I have also observed issues with MailboxAddress.Parse after 2.5.0, previously
Im assuming this issue is related how i can create another issue if you believe it is not. |
@The-Nutty I suspect that you are correct believing that it is related. I'll try to dig into this soon. |
Turns out it was a trivial bug/fix ;-) I added unit tests to cover both of these examples and they are both passing now. Thanks for the bug report, guys! |
Just released MimeKit 2.5.1 with this fix. |
Describe the bug
Prior to version 2.5.0 MailboxAddress.Parse("test.tä[email protected]") worked fine but now a ParseException is thrown.
MimeKit.ParseException
HResult=0x80131537
Message=Invalid address token at offset 0
Source=MimeKit
StackTrace:
at MimeKit.InternetAddress.TryParse(ParserOptions options, Byte[] text, Int32& index, Int32 endIndex, Int32 groupDepth, AddressParserFlags flags, InternetAddress& address) in InternetAddress.cs:
Platform:
To Reproduce
MailboxAddress parsed = MailboxAddress.Parse("test.tä[email protected]");
Expected behavior
MailboxAddress.Parse should be able to parse the text parameter even if it contains only one valid international email address and no name or any other information.
Additional context
new MailboxAddress("test.tä[email protected]") works fine and MailboxAddress.Parse works if i surround the international address with "<" ">" like "<test.tä[email protected]>".
i tried to narrow down the change that created that bug (2.4.1...2.5.0)
i am not sure but maybe it has something to do with commit Fixed mailbox address parser to be more lenient about []'s in the dis…
PS: Thank you soooo much for this awesome library (mailkit + mimekit)
The text was updated successfully, but these errors were encountered: