This shows you the differences between two versions of the page.
| reference:spamrules_statement_foreach_bag [2011/08/22 15:42] – created simon | reference:spamrules_statement_foreach_bag [2011/08/22 16:32] (current) – removed simon | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ======Spam Filter Rules: ForEach Bag====== | ||
| - | ^Statement | ||
| - | ^Version | ||
| - | ^Purpose | ||
| - | The **ForEach Bag** statement requires a bag name and a loop variable name, in the format | ||
| - | ForEach Bag <bag name> <loop variable name> | ||
| - | |||
| - | On each pass through the loop, the loop variable will contain the next value from the bag, in the order they were added. | ||
| - | |||
| - | All **ForEach Bag** statements must be followed by an **EndFor** statement | ||
| - | |||
| - | |||
| - | =====Example===== | ||
| - | The following example loops through everything stored in the ' | ||
| - | < | ||
| - | ForEach Bag recipients ThisRcpt | ||
| - | Log " | ||
| - | EndFor | ||
| - | #There should be a separate entry in the log file for each value in the bag | ||
| - | </ | ||