info.mailtraq.com > Management > Script Functions A-Z > MessageBody() MessageBody()Returns the specified lines from the current message context. If no parameters are supplied for the function, the entire message is returned commencing with line zero which is the obligatory empty line after RFC2822 message headers. If a single parameter is supplied, the corresponding line number of the message is returned. If two parameters are supplied, the lines between the two parameters, inclusively, are returned.
The integer line numbers must be less than the line count of the message body, as obtained from the MsgGetLineCount() function, If the optional second argument is supplied, it must be the same as or greater than the integer supplied for the first argument; if less, nul is returned.
output := MessageBody( [ line_num [ , line_num ] ] )
- line_num
- An integer line number required from the body of the current message, commencing at one for the first line.
- output
- The extracted text of the message with line end carriage returns preserved
//Example usage
MessageBody(1)
// returns the first line of a message body
MessageBody(1, 1)
// returns the first line of a message body
MessageBody(2,10)
// returns lines two to ten of the message body |