Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    MatchOptions
    Implements
    IValidatableObject
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: mailslurp.Model
    Assembly: mailslurp.dll
    Syntax
    [DataContract(Name = "MatchOptions")]
    public class MatchOptions : IValidatableObject

    Constructors

    View Source

    MatchOptions(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 { field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }. Options are additive so if one does not match the email is excluded from results.

    List<ConditionOption> conditions

    Zero or more conditions such as { condition: 'HAS_ATTACHMENTS', value: 'TRUE' }. Note the values are the strings TRUE|FALSE not booleans..

    Properties

    View Source

    Conditions

    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 { condition: 'HAS_ATTACHMENTS', value: 'TRUE' }. Note the values are the strings TRUE|FALSE not booleans.

    View Source

    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 { field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }. Options are additive so if one does not match the email is excluded from results

    Methods

    View Source

    ToJson()

    Returns the JSON string presentation of the object

    Declaration
    public virtual string ToJson()
    Returns
    Type Description
    string

    JSON string presentation of the object

    View Source

    ToString()

    Returns the string presentation of the object

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    String presentation of the object

    Overrides
    object.ToString()

    Implements

    IValidatableObject
    • View Source
    In this article
    Back to top See MailSlurp website for more information.