Using mabl Mailbox

Creating a mabl Mailbox address and using it for email testing

After creating a mabl Mailbox address, you can use it to create end-to-end tests that include email validation.

This article explains how to test emails in mabl Mailbox:

  • Using a mabl Mailbox address in a form
  • Creating an email assertion
  • Opening an email

Using a mabl Mailbox address in a form

To use a mabl Mailbox address in a form, take the following steps:

  1. Click on the plus icon at the bottom of the mabl Trainer window to add a step.
  2. Click on the Mailbox step.
  3. Select "Insert email address."
  4. Click on the input element in the browser window where you wish to insert the mabl mailbox address.
Using a mabl Mailbox address

Using a mabl Mailbox address

  1. Select the permanent or temporary email address from the dropdown in the Trainer window.
  2. Click OK to insert the email address into the input field you selected.

Once you submit your form and send the email, the message is sent to the mabl Mailbox.

Creating an email assertion

The next step is to check whether the email has been received:

  1. Click on the plus icon at the bottom of the mabl Trainer window to add a step.
  2. Click on the Mailbox step.
  3. Select "Open mabl Mailbox".
Opening mabl Mailbox

Opening mabl Mailbox

  1. In the mabl Mailbox modal, use the "Select inbox" dropdown to select the inbox you would like to test.
Select inbox dropdown
  1. Click on the Assert button next to the email you want to assert.
  2. Confirm the email match criteria you would like to use to select which email to assert.
  3. Configure the email assertion. You may assert against the sender address or the email subject. Additional options include disable case sensitivity and failure options. See the article on assertions for details on those options.

Opening an email

You can interact with the received email and follow links as if it were a typical web page. To open an email sent to a mabl Mailbox email address, take the following steps:

  1. Click on the plus icon at the bottom of the mabl Trainer window to add a step.
  2. Click on the Mailbox step.
  3. Select "Open mabl Mailbox".
  4. In the mabl Mailbox modal, use the "Select inbox" dropdown to select the inbox you would like to test.
  5. Click on the Open button for the email you want to open.
Opening an email inbox

Opening an email inbox

  1. Confirm the email match criteria you would like to select which email to open.

Now you can interact with the rendered email as if it were any other webpage.

📘

Limitation

The mabl Mailbox stores the 100 most recent emails in the inbox.

Verifying attachments

When viewing and interacting with the rendered email, you also have the ability to verify attachments to ensure that you're able to test every part of an email. Mabl Mailbox supports:

  • Inline attachments (Inline attachments are intended to be part of the email body).
  • Regular Attachments

🚧

Note on attachment size

The total email size must be less than 10 MiB. Since this includes all email headers and metadata, the attachment limit is also under 10 MiB.

Click on the link to the attachment to download it. Mabl will automatically download the attachment and let you assert on it normally, as you would with any other download.

582

The location of attachments within a mabl Mailbox rendered email.

If the attachment is a PDF, and your subscription plan includes PDF support, the Trainer window asks if you would like to test the PDF. From here you can test your PDF as you would any other.

📘

Attachment expiration

Attachment links expire after 1 hour. If you keep a mabl Mailbox open during training for over an hour, the links will not resolve. To refresh the attachment links, you can replay the trained test.

Email match criteria

When you record an assert email or open email step, mabl asks you to confirm the "email match criteria" to select which email to interact with.

You can edit the email match criteria for an existing email step by clicking on "More actions (...)" and selecting "Edit email match criteria".

Editing email match criteria

Editing email match criteria

Exact matches

If the mabl Mailbox contains multiple emails with the same sender address and subject line, mabl opens the most recently delivered matching email.

Permanent email addresses and concurrent runs

The inbox for a permanent email address is shared by every test that uses the same permanent email address. For this reason, if you use a permanent email address during concurrent runs, it is possible for an assert email or open email step to select an email that was sent by a different test run.

To mitigate this scenario, consider the following methods:

  • Use the "Edit email match criteria" option to make email-related steps more specific about which email mabl should choose
  • Avoid running tests concurrently if they send identical emails.

Exploring the Mailbox sandbox

Interested in learning more about mabl Mailbox? We recommend testing against the mabl sandbox app, which has a dedicated Mailbox section. To start trying it out, you can add an email address, subject, and body.

500

Mabl sandbox Mailbox example