the From, To and Cc header fields are not supporting encoded words, in the name field of the address, as referred in rfc2047-5.3...
I changed this in my version: in SharpMimeHeader, in the From, To and Cc properties, i set the GetHeaderField's rfc2047decode argument to true. I'm not sure it's the correct solution but it seems to work :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, the point of the SharpMimeHeader class and their properties is to give raw access to header's content. If you need decoded content, you can use SharpMessage.GetHeaderField.
Keep in mind that From, To and Cc headers are more complex than simple encoded words, they must be first parsed as name-addr items and then only apply rfc 2047 decoding to the display-name part and leave addr-spec alone. So if you apply decoding to the raw header you can screw it up.
SharpMessage's From, To, Cc properties are the right way to access these headers, as they provide an IEnumerable list of SharpMimeAddress instances that have handled decoding properly.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
the From, To and Cc header fields are not supporting encoded words, in the name field of the address, as referred in rfc2047-5.3...
I changed this in my version: in SharpMimeHeader, in the From, To and Cc properties, i set the GetHeaderField's rfc2047decode argument to true. I'm not sure it's the correct solution but it seems to work :)
Well, the point of the SharpMimeHeader class and their properties is to give raw access to header's content. If you need decoded content, you can use SharpMessage.GetHeaderField.
Keep in mind that From, To and Cc headers are more complex than simple encoded words, they must be first parsed as name-addr items and then only apply rfc 2047 decoding to the display-name part and leave addr-spec alone. So if you apply decoding to the raw header you can screw it up.
SharpMessage's From, To, Cc properties are the right way to access these headers, as they provide an IEnumerable list of SharpMimeAddress instances that have handled decoding properly.
Sorry, i wasn't seeing the all picture. Thanks for your time.
I should definitely improve documentation :)