OpenWGA 7.0 - TMLScript reference

Method :

createMail([host, username, password])

On object WGA
Usage Creates a Mail object for sending e-mails

By parameter you can explicitly set a SMTP server, plus username and password for login, which should be used for sending e-mails. If you omit these parameters WGA uses the mail configuration of the OpenWGA server.

For backward compatibility there still is a method "createMail()" available on TMLContext whose use is discouraged since OpenWGA 5.3.

Parameters host (String, optional):
The hostname of the SMTP server used to send e-mails

username (String, optional)
The username to login to the SMTP server

password (String, optional)
The password to login to the SMTP server

Return value A new Mail object
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events