MailSlurpAPI.Api.WaitForController.wait_for_matching_first_email

You're seeing just the function wait_for_matching_first_email, go back to MailSlurpAPI.Api.WaitForController module for more information.
Link to this function

wait_for_matching_first_email(connection, match_options, opts \\ [])

Specs

wait_for_matching_first_email(
  Tesla.Env.client(),
  MailSlurpAPI.Model.MatchOptions.t(),
  keyword()
) :: {:ok, MailSlurpAPI.Model.Email.t()} | {:error, Tesla.Env.t()}

Wait for or return the first email that matches proved MatchOptions array Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the MatchOptions object for options. An example payload is { matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController getEmailContentMatch method.

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • match_options (MatchOptions): matchOptions
  • opts (KeywordList): [optional] Optional parameters
    • :inbox_id (String.t): Id of the inbox we are matching an email for
    • :timeout (integer()): Max milliseconds to wait
    • :unread_only (boolean()): Optional filter for unread only

      Returns

} on success {:error, info} on failure