info.mailtraq.com > Management > Script Functions A-Z > MsgAddLine() MsgAddLine()Adds a line to the end of the current message. This function is identical to the MsgInsertLine() function except that the index is implicitly the value returned by the MsgGetLineCount() function.
MsgAddLine( string )
- string
- The text of the line to be added to the message
// Add a signature to the end of the current message
sig_file := OpenFile("sig-john.txt");
While(Not(EOF(sig_file)),
MsgAddLine(Read(sig_file))
);
CloseFile(sig_file) // Multiple lines may be added simultaneously
// using the "\n" escape.
MsgAddline("\nThis is line one.\nThis is line two")
Note
When composing new messages with this function in conjunction with the PostMesssage() function, it is the responsibility of the script writer to format the message correctly. In particular, note that RFC2822 messages require a blank line to delimit the headers of a message from its message body as shown in the above example. |