Class MailRule
- Namespace
- MailFathom.Application.Rules
- Assembly
- MailFathom.Application.dll
One rule of a bound rule set: a name, the accounts it applies to, a condition, and what a match does.
public sealed class MailRule
- Inheritance
-
MailRule
- Inherited Members
Remarks
Carries a compiled condition rather than the text it was written from, so nothing downstream of binding can read what an operator typed. What a rule can be reported by is its name, which is MailFathom's own configured name for it and carries no personal data of its own.
Properties
- Accounts
Gets the accounts this rule applies to, empty for a rule that applies to every account.
- Actions
Gets what a match does to the matching email, in the order the changes are applied.
- Condition
Gets the condition an email is matched against.
- Name
Gets the name the rule is declared and reported under.
- Schedule
Gets the occasions a scheduled walk of this rule happens on, and null when it declares no schedule.
- StopWhenMatched
Gets whether a match ends the pass rather than continuing to the rules declared below this one.
- Triggers
Gets the automatic triggers this rule takes part in, empty for a rule only a requested walk runs.
Methods
- AppliesTo(string)
Reports whether this rule is one of the rules the given account's mail is passed through.
- Create(string, IMailRuleCondition, MailRuleActionSet?, bool, IReadOnlyList<string>?, IReadOnlyList<MailRuleTrigger>?, JobRecurrence?)
Creates a rule from a condition that has already been proven usable.
- RunsOn(MailRuleTrigger)
Reports whether this rule is one an automatic trigger runs.