Class EmailMessageEvaluator
- Namespace
- ArcanaDevelopment.adTempus.Shared.EmailProcessing
- Assembly
- ArcanaDevelopment.adTempus.Shared.dll
Base class for e-mail message evaluators.
[Serializable]
[DataContract]
public class EmailMessageEvaluator : ExpressionNode
- Inheritance
-
objectEmailMessageEvaluator
Fields
FilterType
Specifies whether the evaluator will evaluate the message or its attachments.
[DataMember]
public EmailFilterType FilterType
Field Value
IgnoreCase
Specifies whether the comparison should be case-sensitive. Default: true (case-insensitive).
[DataMember]
public bool IgnoreCase
Field Value
- bool
MatchRule
The rule to use when comparing the PropertyName to the TargetValue value.
[DataMember]
public TextMatchRule MatchRule
Field Value
PropertyName
The field to look at.
[DataMember]
public string PropertyName
Field Value
- string
Remarks
The following standard tags can be used for EmailFilterType.Message:
- From The message sender (name and address)
- To The recipients in the TO field (names and addresses)
- CC The recipients in the CC field (names and addresses)
- Recipients The recipients in either the TO or CC fields (names and addresses)
- Subject The message subject
- Body The message body. Will look at both text and HTML body parts, if present, but not other attachments. Use EmailMessageAttachmentEvaluator to evaluate attachments.
- Header The header with the name specified in the PropertySubName field. For any other value, the evaluator looks for a header with the specified name.
The following tags can be used for EmailFilterType.Attachment:
- Name The name of the attachment
- Extension The file extension of the attachment
- ContentType The content type/subtype of the attachment
- Content The content of the attachment
PropertySubName
The name of the header to match if PropertyName=="header"
[DataMember]
public string PropertySubName
Field Value
- string
TargetValue
The value to compare the PropertyName to.
[DataMember]
public string TargetValue
Field Value
- string
Remarks
The TargetValue will be either simple text or a regular expression (using .NET regex syntax) depending on the MatchRule.
UseRegEx
Use a Regular Expression for matching.
[DataMember]
public bool UseRegEx
Field Value
- bool
Methods
Evaluate(object, object)
Evaluates the rule against an e-mail message.
public override bool Evaluate(object target, object parameters)
Parameters
| Name | Type | Description |
|---|---|---|
target |
object | The object to evaluate the rule against. This must be of type System.Net.Mail.MailMessage or an ArgumentException is thrown. |
parameters |
object |
Returns
- bool
True if the rule matches the message; False otherwise.
PropertyNameDescription(string)
Gets the string resource for the specified PropertyName
public static string PropertyNameDescription(string value)
Parameters
| Name | Type | Description |
|---|---|---|
value |
string |
Returns
- string
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.