The Subject condition is used to define the message subject that once met will trigger an action to be processed by the program.
To define the subject within the Conditions tab, expand the Field's context menu and choose Subject (Fig. 1.).
|Fig. 1. Choosing Subject in the Conditions tab.|
There are two factors (Fig. 2.) that need to be configured within this condition:
- Operator - enables definition of how the condition will be executed. The execution method may be only set to true.
In this particular condition, the operator may be set to trigger an action if the message subject:
- matches exact phrase - it defines that the program should search for the exact match of the chosen phrase in the message subject, e.g. "test". If the subject contains the defined phrase ("test") then the program will apply the action. If, however, there is no match (e.g. there is the word "tester" used in message content) the program will just ignore it, and no action will be taken.
- matches regular expression - it defines a sequence of characters that forms a search pattern of phrases in the subject of messages. CodeTwo Exchange Rules supports the standard Microsoft's .NET type of regular expressions. Learn more about regular expressions
- contains keyword(s)
- Actual condition value - here you define the expected value of the condition that will trigger the rule to apply the action.
|Fig. 2. Configuring the Subject.|
Please note that the value field depends on the operator, and its definition type may differ in regards to the chosen operator. What is more, matching is always done case-insensitively.
You can use empty email's subject line as a Condition/Exception. To do so, when configuring Condition/Exception set Field filter to Subject (see Fig. 2.), set Operator to is equal and leave Value field empty. This way, if an email's subject line is empty the condition/exception will be met.