Setting the message body using non US-ASCII data

Top  Previous  Next

The email message protocols state that the message body is limited to characters in the US-ASCII character set.  In order to use characters in other languages that are outside of the US-ASCII character set the data must be encoded.  The EmailMessage class handles this for you provided that you instruct it which character set to use when encoding the message.

 

Example

 

// create new email message

EmailMessage message = new EmailMessage();

 

// set body and character set encoding

message.setBody("Mit herzlichen Grüßen","iso-8859-1");

 

 

See also

 

Character set definitions





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

© 2021 JSCAPE LLC