Class MatchOptions
Optional filter for matching emails based on fields. For instance filter results to only include emails whose SUBJECT
value does CONTAIN
given match value. An example payload would be { matches: [{ field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }] }
. You can also pass conditions such as HAS_ATTACHMENT
. If you wish to extract regex matches inside the email content see the getEmailContentMatch
method in the EmailController.
Implements
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "MatchOptions")]
public class MatchOptions : IValidatableObject
Constructors
View SourceMatchOptions(List<MatchOption>, List<ConditionOption>)
Initializes a new instance of the MatchOptions class.
Declaration
public MatchOptions(List<MatchOption> matches = null, List<ConditionOption> conditions = null)
Parameters
Type | Name | Description |
---|---|---|
List<MatchOption> | matches | Zero or more match options such as |
List<ConditionOption> | conditions | Zero or more conditions such as |
Properties
View SourceConditions
Zero or more conditions such as { condition: 'HAS_ATTACHMENTS', value: 'TRUE' }
. Note the values are the strings TRUE|FALSE
not booleans.
Declaration
[DataMember(Name = "conditions", EmitDefaultValue = true)]
public List<ConditionOption> Conditions { get; set; }
Property Value
Type | Description |
---|---|
List<ConditionOption> | Zero or more conditions such as |
Matches
Zero or more match options such as { field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }
. Options are additive so if one does not match the email is excluded from results
Declaration
[DataMember(Name = "matches", EmitDefaultValue = true)]
public List<MatchOption> Matches { get; set; }
Property Value
Type | Description |
---|---|
List<MatchOption> | Zero or more match options such as |
Methods
View SourceToJson()
Returns the JSON string presentation of the object
Declaration
public virtual string ToJson()
Returns
Type | Description |
---|---|
string | JSON string presentation of the object |
ToString()
Returns the string presentation of the object
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | String presentation of the object |