Try OpenEdge Now
skip to main content
Application Developer's Guide
Developing an application : Using JavaScript in a workstep : Integrating JavaScript : Setting e-mail to a different language with JavaScript
 
Setting e-mail to a different language with JavaScript
You may adjust the character set to a language of your choice for e-mails. This is done with either pre- or post-script. The following example demonstrates sending an e-mail in Japanese:
var obj = jst.getSendEmailObject("ISO-2022-JP");
    obj.setMailFrom("home@savvion.com");
    obj.setMailTo("john@savvion.com");
    obj.addMailTo("mary@savvion.com");
    obj.setSubject("<Japanese subject>");
    obj.appendText("<Japanese message: line 1>");
    obj.appendText("<Japanese message: line 2>...");
    obj.send();