We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Not sure if it is a bug but I find it confusing
(note the dot at the end of the name which makes it an invalid address)
InternetAddressList.TryParse("[email protected]", out var mailAddresses).
Returns true and an empty InternetAddressList. But
true
InternetAddressList.Parse("[email protected]");
throws exception Invalid local-part at offset 0
Invalid local-part at offset 0
Platform (please complete the following information):
Exception Invalid local-part at offset 0
at MimeKit.InternetAddress.TryParseLocalPart(Byte[] text, Int32& index, Int32 endIndex, RfcComplianceMode compliance, Boolean skipTrailingCfws, Boolean throwOnError, String& localpart) in D:\src\MimeKit\MimeKit\InternetAddress.cs:line 309 at MimeKit.InternetAddress.TryParseAddrspec(Byte[] text, Int32& index, Int32 endIndex, Byte[] sentinels, RfcComplianceMode compliance, Boolean throwOnError, String& addrspec, Int32& at) in D:\src\MimeKit\MimeKit\InternetAddress.cs:line 377 at MimeKit.InternetAddress.TryParse(ParserOptions options, Byte[] text, Int32& index, Int32 endIndex, Int32 groupDepth, AddressParserFlags flags, InternetAddress& address) in D:\src\MimeKit\MimeKit\InternetAddress.cs:line 780 at MimeKit.InternetAddressList.TryParse(ParserOptions options, Byte[] text, Int32& index, Int32 endIndex, Boolean isGroup, Int32 groupDepth, Boolean throwOnError, List`1& addresses) in D:\src\MimeKit\MimeKit\InternetAddressList.cs:line 592 at MimeKit.InternetAddressList.Parse(ParserOptions options, String text) in D:\src\MimeKit\MimeKit\InternetAddressList.cs:line 1019 at MimeKit.InternetAddressList.Parse(String text) in D:\src\MimeKit\MimeKit\InternetAddressList.cs:line 1040
Expected behavior I expected InternetAddressList.TryParse to either return true and a mailbox (for later validation) or return false.
InternetAddressList.TryParse
The text was updated successfully, but these errors were encountered:
Fixed InternetAddressList.TryParse() to fail on invalid input
52891c1
Fixes issue #762
Parse
TryParse
No branches or pull requests
Describe the bug
Not sure if it is a bug but I find it confusing
(note the dot at the end of the name which makes it an invalid address)
Returns
true
and an empty InternetAddressList. Butthrows exception
Invalid local-part at offset 0
Platform (please complete the following information):
Exception
Invalid local-part at offset 0
Expected behavior
I expected
InternetAddressList.TryParse
to either return true and a mailbox (for later validation) or return false.The text was updated successfully, but these errors were encountered: