9. Resource Manager - Template Editor

A Template Resource can contain text with embedded expressions. Templates are retrieved with a method in the Server API. Embedded expressions are evaluated when the template is retrieved. A server plugin method using this facility could:

. Get some data from a database.
. Place the data into the fields referenced in the template resource (if necessary).
. Evaluate the Template resource name to compile the mail body using $GetTemplate.
. Pass the mail body to either $SendMail or $QueMail.

The following variables can be embedded in the text:

  • Variables declared in Omnis file classes in the plugin library.
  • Omnis hash variables.
  • Macro variables if the Mail Resource is compiled by a Code Resource.
  • Omnis expressions.

The syntax for embedded expressions is: [=expression]