In mabl, you can create multiple distinct email addresses and tag them with a custom prefix to make them easy to differentiate. Custom prefixes can be useful if you need to query the results containing the custom prefixes in your own databases.
Here are the steps you can take to do this:
Create a base email address
- Click on the {x} icon to create a variable.
- Click on Create a new variable.
- Select mabl mailbox address as the variable source.
- Give the variable a name.
- Click OK.

Create a prefixed email address
- Click on the {x} icon to create a variable.
- Click on Create a new variable.
- Select string template as the variable source.
- In the Pattern field, create a value in this form:
prefix+{{@base_address}}
. The prefixed address should the following components:- Prefix: up to 20 lowercase characters conforming to the regex [a-z0-9]{1,20}
- Separator: a dash
-
, underscore_
, or plus sign+
to separate the prefix from the base address - Base address: use mabl variable syntax to reference the mabl mailbox variable, for example
{{@base_address}}
- Give the variable a name.
- Click OK.

Whatever prefix you add, all email is sent to the inbox for the original generated base address. You can use the prefixed email address as you would normally for a mabl Mailbox address. For example, send an email to that address and then assert on and interact with the email in the Trainer.
Limitation
Only temporary email addresses support custom email prefixes. Permanent email addresses do not support custom email prefixes.