Class SearchCriteria

java.lang.Object
com.mailosaur.models.SearchCriteria

public class SearchCriteria extends Object
The criteria with which to find messages during a search.
  • Constructor Details

    • SearchCriteria

      public SearchCriteria()
  • Method Details

    • withSentFrom

      public SearchCriteria withSentFrom(String sentFrom)
      Sets the full email address (or phone number for SMS) from which the target message was sent.
      Parameters:
      sentFrom - Email address (or phone number for SMS).
      Returns:
      the SearchCriteria object itself.
    • withSentTo

      public SearchCriteria withSentTo(String sentTo)
      Sets the full email address (or phone number for SMS) to which the target message was sent.
      Parameters:
      sentTo - Email address (or phone number for SMS).
      Returns:
      the SearchCriteria object itself.
    • withSubject

      public SearchCriteria withSubject(String subject)
      Sets the value to seek within the subject line of a target email.
      Parameters:
      subject - The value to seek within the subject line of a target email.
      Returns:
      the SearchCriteria object itself.
    • withBody

      public SearchCriteria withBody(String body)
      Sets the value to seek within the body of the target message.
      Parameters:
      body - The value to seek within the body of the target message.
      Returns:
      the SearchCriteria object itself.
    • withMatch

      public SearchCriteria withMatch(SearchMatchOperator match)
      If set to `ALL` (default), then only results that match all specified criteria will be returned. If set to `ANY`, results that match any of the specified criteria will be returned.
      Parameters:
      match - Match `ALL` or `ANY` of the specified criteria.
      Returns:
      the SearchCriteria object itself.