OpenWGA 7.10 - TMLScript reference
The "Mail" object provides comfortable creation and sending of SMTP E-Mails. It either uses the Mail Configuration of the OpenWGA server or some custom SMTP server configured on object creation.
The object represents a mail whose usual fields like to, subject, body etc. can be filled with data. You can also add attachment files either by specifying their URL or a file in file system.
When the mail is finished it can be either sent or returned as native mail object for further, more specific operations. A single mail can be used to send the mail data multiple times. You can also modify the data between sending calls if you need to send multiple mails with slightly differing data.
The Mail object is not "thread safe", i.e. one instance of it cannot be reused across requests or used on multiple requests/scripts simultaneously.
|Allowed in script types||
|Properties and methods||
This example creates a mail object, initializes it with the neccessary data from a WebTML form and sends it. Note the mime type "text/html" that is set. In that case the body content should also be HTML code.
var mail = WGA.createMail();