WaitForControllerApi

All URIs are relative to https://api.mailslurp.com

MethodHTTP requestDescription
wait_forpost /waitForWait for an email to match the provided filter conditions such as subject contains keyword.
wait_for_email_countget /waitForEmailCountWait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs
wait_for_latest_emailget /waitForLatestEmailFetch inbox’s latest email or if empty wait for an email to arrive
wait_for_matching_emailspost /waitForMatchingEmailsWait or return list of emails that match simple matching patterns
wait_for_matching_first_emailpost /waitForMatchingFirstEmailWait for or return the first email that matches provided MatchOptions array
wait_for_nth_emailget /waitForNthEmailWait for or fetch the email with a given in the inbox specified. If doesn’t exist waits for it to exist or timeout to occur.

wait_for

Veccrate::models::EmailPreview wait_for(wait_for_conditions) Wait for an email to match the provided filter conditions such as subject contains keyword.

Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met

Parameters

NameTypeDescriptionRequiredNotes
wait_for_conditionsOption<WaitForConditions>Conditions to apply to emails that you are waiting for

Return type

Veccrate::models::EmailPreview

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

wait_for_email_count

Veccrate::models::EmailPreview wait_for_email_count(before, count, delay, inbox_id, since, sort, timeout, unread_only) Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs

If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.

Parameters

NameTypeDescriptionRequiredNotes
beforeOption<String>Filter for emails that were received before the given timestamp
countOption<i32>Number of emails to wait for. Must be greater that 1
delayOption<i64>Max milliseconds delay between calls
inbox_idOption<String>Id of the inbox we are fetching emails from
sinceOption<String>Filter for emails that were received after the given timestamp
sortOption<String>Sort direction
timeoutOption<i64>Max milliseconds to wait
unread_onlyOption<bool>Optional filter for unread only[default to false]

Return type

Veccrate::models::EmailPreview

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

wait_for_latest_email

crate::models::Email wait_for_latest_email(before, delay, inbox_id, since, sort, timeout, unread_only) Fetch inbox’s latest email or if empty wait for an email to arrive

Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set unreadOnly=true or see the other receive methods such as waitForNthEmail or waitForEmailCount.

Parameters

NameTypeDescriptionRequiredNotes
beforeOption<String>Filter for emails that were before after the given timestamp
delayOption<i64>Max milliseconds delay between calls
inbox_idOption<String>Id of the inbox we are fetching emails from
sinceOption<String>Filter for emails that were received after the given timestamp
sortOption<String>Sort direction
timeoutOption<i64>Max milliseconds to wait
unread_onlyOption<bool>Optional filter for unread only.[default to false]

Return type

crate::models::Email

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

wait_for_matching_emails

Veccrate::models::EmailPreview wait_for_matching_emails(match_options, before, count, delay, inbox_id, since, sort, timeout, unread_only) Wait or return list of emails that match simple matching patterns

Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are 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

NameTypeDescriptionRequiredNotes
match_optionsMatchOptionsmatchOptions[required]
beforeOption<String>Filter for emails that were received before the given timestamp
countOption<i32>Number of emails to wait for. Must be greater or equal to 1
delayOption<i64>Max milliseconds delay between calls
inbox_idOption<String>Id of the inbox we are fetching emails from
sinceOption<String>Filter for emails that were received after the given timestamp
sortOption<String>Sort direction
timeoutOption<i64>Max milliseconds to wait
unread_onlyOption<bool>Optional filter for unread only[default to false]

Return type

Veccrate::models::EmailPreview

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

wait_for_matching_first_email

crate::models::Email wait_for_matching_first_email(match_options, before, delay, inbox_id, since, sort, timeout, unread_only) Wait for or return the first email that matches provided 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

NameTypeDescriptionRequiredNotes
match_optionsMatchOptionsmatchOptions[required]
beforeOption<String>Filter for emails that were received before the given timestamp
delayOption<i64>Max milliseconds delay between calls
inbox_idOption<String>Id of the inbox we are matching an email for
sinceOption<String>Filter for emails that were received after the given timestamp
sortOption<String>Sort direction
timeoutOption<i64>Max milliseconds to wait
unread_onlyOption<bool>Optional filter for unread only[default to false]

Return type

crate::models::Email

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

wait_for_nth_email

crate::models::Email wait_for_nth_email(before, delay, inbox_id, , since, sort, timeout, unread_only) Wait for or fetch the email with a given in the inbox specified. If doesn’t exist waits for it to exist or timeout to occur.

If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned.

Parameters

NameTypeDescriptionRequiredNotes
beforeOption<String>Filter for emails that were received before the given timestamp
delayOption<i64>Max milliseconds delay between calls
inbox_idOption<String>Id of the inbox you are fetching emails from
****Option<i32>Zero based of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass =1[default to 0]
sinceOption<String>Filter for emails that were received after the given timestamp
sortOption<String>Sort direction
timeoutOption<i64>Max milliseconds to wait for the nth email if not already present
unread_onlyOption<bool>Optional filter for unread only[default to false]

Return type

crate::models::Email

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]