Setting the message headers using non US-ASCII data

Top  Previous  Next

The email message protocols state that all message headers are 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 EmailMessage instance

EmailMessage msg = new EmailMessage();

 

// set subject encoding data using iso-8859-1 character set

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

 

 

See also

 

Character set definitions





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

© 2021 JSCAPE LLC