Sending an Email message for languages other than English

Top  Previous  Next

Per RFC 822, all email messages created assume the presence of US-ASCII data in both the headers and body of the email message. If any part of your email message contains data that is not included in the US-ASCII character set then it is necessary to provide this character set information when building your email message.

 

Several of the methods in the EmailMessage class have been overloaded to accept character set information.

 

Example

 

[C#]

EmailMessage message = new EmailMessage();

message.SetTo("Jän Freidman", "iso-8859-1");

message.SetSubject("Guten tag!", "iso-8859-1");

 

 

[Visual Basic]

Dim message As EmailMessage = Nothing

message = New EmailMessage()

message.SetTo("Jän Freidman", "iso-8859-1")

message.SetSubject("Guten tag!", "iso-8859-1")

 

The above code example sets the character set used to that of the Western European group. The To address for this message contains the character ä. The ä character is not included in the US-ASCII character set, therefore, to display this information properly the character encoding must be passed into the SetTo and SetSubject methods as the second argument.

 





Home | Company | Products | Solutions | Purchase | Support | Services | Blog

© 2021 JSCAPE LLC