info.mailtraq.com > Management > Script Functions A-Z > MsgGetLineCount() MsgGetLineCount()Returns the number of lines in the current message body. Use this function to identify the range of valid line indices. For example, a value of '5' indicates that the message lines from '0' to '4' are valid.
lines := MsgGetLineCount()
- lines
- The number of lines in the message body.
Rejects list messages over 200 lines long and composes a rejection notice to the author If(MsgGetLineCount() > 200,
Do(
your_id := Header("Message-ID"),
your_date := Header("Date"),
your_reply := If(Header("Reply-To") = "",
AddressOf(Header("From")),
AddressOf(Header("Reply-To"))
),
PostMessage("postmaster", your_reply,
Do(
SetHeader("Subject", "Failed Message : list policy max 200 lines" ),
MsgAddLine("The message you forwarded to this mailing list exceeded"),
MsgAddLine("the maximum permissible of 200 lines."),
MsgAddLine("Message-ID: " ++ your_id),
MsgAddLine("Date: " ++ your_date)
)
)
)
) |