MailSlurp has many functions for receiving emails. One popular method is the wait methods.

Wait For methods let you wait for an email to arrive to an inbox during tests or code. This way you can perform actions and wait for the expected email to arrive. The API will hold the connection open so with WaitFor you don't need to repeat long-poll the API to check your emails.

See the API documentation for more information.


MailSlurps WaitForController endpoints can be used to wait for an email (or a number of emails) to arrive in an inbox. Here is an example using the Javascript client.