I appreciate your responses. So it sounds like reflection is a no go.
I want to do this because this is how long encoded words are supposed to be handled.
http://www.ietf.org/rfc/rfc2047.txt
Page 3, "2. Syntax of encoded-words"
Unless this is outdated at this point? Maybe I don't need to be worried about it? I'm just trying to follow the spec.
I've tried not breaking...
User Profile
Collapse
-
A subject line is not just a simple string. Within the class MailMessage, the subject line is actually defined as follows:
private Message message;
When you set MailMessage.Sub ject, it actually does:
Code:public string Subject { get { if (this.message.Subject == null) { return string.Empty; } return this.message.Subject;
Last edited by Frinavale; Aug 3 '10, 03:09 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags then fixed my code tags to better fit the post.Leave a comment:
-
MailMessage subject line non-compliant with RFC 2047
I have been trying to workaround a non-compliancy issue within version 4.0 of the .NET framework. According to RFC 2047, in the subject line an encoded word can not be longer than 75 characters. If it is, it must be broken up into multiple encoded words separated by CRLF SPACE.
If you use the MailMessage class and try to assign a string with CR or LF, it throws an exception. Internally, it is calling MailBnfHelper.H asCROrLF(value)...
No activity results to display
Show More
Leave a comment: