I get a Invalid local-part at offset 0 (MimeKit.ParseException) exception at new MailboxAddress. Could a leading whitespace cause this exception?
I have updated via NuGet to the latest version today. Surprisingly with the old version (1.10), the whitespace mail address worked.
The address string that you pass to new MailboxAddress should be in its canonical form.
So yes, leading spaces could cause this to fail.
MimeKit got a bit stricter here because it now also adds support for IDN addresses which means it actually has to parse the strings in order to break the string into its component pieces.
Thank you for your quick reply. 馃槃
Most helpful comment
The address string that you pass to
new MailboxAddressshould be in its canonical form.So yes, leading spaces could cause this to fail.
MimeKit got a bit stricter here because it now also adds support for IDN addresses which means it actually has to parse the strings in order to break the string into its component pieces.