MailSlurp has many methods for sending and receiving emails. Here are three main ways to receive emails with MailSlurp.

See the Email Model Specification for available properties and content for emails. See the attachments guide for help with attachments.

1) Email controller

EmailControllerApi methods such as and return existing emails and content from inboxes. Call the method to return a paginated list of existing emails inside your inboxes. Call the to fetch an individual email and content.

2) WaitFor controller

WaitForControllerApi methods such as hold a connection open until conditions are met - such as a new email arriving. Use wait for methods in code or tests to perform actions and then test expected emails. Here is a example using the Ruby SDK:

Use to ensure only new emails are returned. See the receiving emails guide for more information.