You can add a custom prefix to your mabl Mailbox email addresses. While mabl supports creating multiple distinct email addresses in a single test, tagging them with a custom prefix can help you easily mark and differentiate them. This approach can be useful if you need to query the results containing the custom prefixes in your own databases.
Only temporary email addresses support custom email prefixes. Permanent email addresses do not support custom email prefixes.
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 contain a prefix, a separator, and the base address.
The prefixed address should contain a prefix, a separator, and the base address.
- Prefix: the custom prefix may consist of up to 20 lowercase characters as a regex: [a-z0-9]{1,20}
- Separator: you must place a separator between the prefix and the base address. Supported separators include: dash
-
, underscore:_
, and plus sign:+
. - Base address: Use mabl variable syntax to refer to the mabl mailbox variable. (In this case,
base_address
becomes{{@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.