-
I am using Mimekit to create and send SMTP messages and has been going well, but we are running into an unexpected problem with long friendly names in the "FROM" header. I get the following output when I "ToString(false)"
but the following output when I "ToString(true)"
The resulting Mime when I serialize with WriteTo comes out as follows:
Is this correct? This is causing problems downstream for us with other mail clients. I've tried setting FormatOptions.International as well, but that doesn't change the output.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
For my code, it seems to fold and add extra quotes once the length of the friendly name hits 77 characters |
Beta Was this translation helpful? Give feedback.
These examples are all the expected result except maybe the last one which seems like the logic could be improved but is still valid output.
What you have to understand is that the rules for addresses make the following criteria:
.
needs to be quoted"This is a \"nested quote\" which will remain" <[email protected]>
Once you understand all of those rules, you can clearly see that the output that MimeKit produces is correct and that the display of the receiving mail client (Outlook?) is wrong.
There is a similar discussion here: #1093