info.mailtraq.com > Management > Script Functions A-Z > PostMessage() PostMessage()Creates a new message and sends it from the specified sender to the specified recipient(s). The content parameter represents the expression to execute in the context of the new message. In other words, when the content is executed, the 'current message' points to the newly created message, prior to it being delivered. The result from the expression is the text of the new message.
PostMessage( sender , rcpts , content )
- sender
- The address to place in the message envelope's sender field
- rcpts
- A comma separated list of recipient address(es)
- content
- The expression to be executed in the context of the new message, i.e. the headers and message body.
Returns a message to the sender of the trigger message indicating that the e-mail address they specified was not found PostMessage("postmaster", MsgGetSender(),
Do(
SetHeader("Subject", "Address Unavailable" ),
MsgAddLine("\nThe address you specified was not found."),
MsgAddLine("Your original message is quoted below:"),
MsgAddLine("-- "),
MsgAddLine(OriginalMessage(25))
)
)
Note
When composing new messages with this function, it is the responsibility of the script writer to format the message correctly. In particular, note that RFC2822 message format require a blank line to delimit the headers of a message from the message body. |