Try OpenEdge Now
skip to main content
BPM Events User's Guide
The rule language : Predefined rule actions : sendMail(): Sending e-mail automatically
 

sendMail(): Sending e-mail automatically

Use the sendMail() predefined rule action to generate an e-mail. The general syntax is:
sendMail(<e-mail address>, <From>, <header>,<content>)
The arguments are:
*Argument 1: E-mail address.
*Argument 2 (optional): Originator information or an e-mail address to reply to, if appropriate. If this argument is not given, then default "sender" data from the oebps.conf file is used.
*Argument 3: A string value that represents the header of the e-mail.
*Argument 4: The body of the e-mail. Given either as an event or as an expression. If given as a long string expression, introduce line breaks by typing the character "\" followed by a new line character (hit Return key).
Example 1: In this example, the content of the event EVT_1 is converted in text format and becomes the body of the e-mail.
sendMail("paul@tdiinc.com","order is late",EVT_1);
Example 2:In this example, the body of the e-mail results from the concatenation of an attribute value of the event EVT_1 (order ID), with a message.
sendMail("paul@acme.com","yourmanager@acme.com", "order is late", EVT_1.orderID + " must be given higher priority." = "\ Signed: your manager");