Forces headers to be encoded, even if all of the characters in the header are an ascii value less than 127.
According to the RFC standards, headers that only contain ASCII characters do not need to be encoded. For force encoding of all headers, regardless if they are only ASCII characters, set ForceHeaderEncding = true
By default, ForceHeaderEncoding = false
[C#]
EmailMessage msg = new EmailMessage( "mail.MyCompany.com" );
msg.FromAddress = "me@MyCompany.com";
msg.To = "you@YourCompany.com";
msg.AddHeader( "X-Organization", "MyCompany.com" );
msg.ForceHeaderEncoding = true;
msg.Subject = "Daily Newsletter";
msg.Body = "Here is our daily newsletter.....";
msg.Send();
[Visual Basic]
Dim msg As New EmailMessage("mail.MyCompany.com")
msg.FromAddress = "me@MyCompany.com"
msg.To = "you@YourCompany.com"
msg.AddHeader( "X-Organization", "MyCompany.com" )
msg.ForceHeaderEncoding = True
msg.Subject = "Daily Newsletter"
msg.Body = "Here is our daily newsletter....."
msg.Send()