Definition
The email transformer can anonymize an existing email address or completely generate a new one. An email is made up of three parts:
<username>@<domain>.<top-level-domain>
By default, the transformer randomizes the username, domain and top-level domain while always preserving the email format by retaining the @ and . characters.
For example, the following input value:
john@acme.com
Would produce the following ouput value:
ytvub873@ksh0293.com
You can see we generated new privacy-safe values for the username and the domain. You can update this structure using the configurations below. Lastly, the email transformer takes in a string
and returns a string
.
Configurations
Depending on your validations, you may want to configure the output email. The email transformer has the following configurations:
Name | Description | Default | Example Input | Example Output |
---|---|---|---|---|
PreserveDomain | Preserve Domain carries over the input domain to the output email address. This includes the domain and top-level domain. | false | john@gmail.com | fjf2903@gmail.com |
PreserveLength | Preserve Length will ensure that the output email address is the same length as the input email address. This includes the domain as well. | false | john@gmail.com | hw98@gmail.com |
Examples
There are several ways you can mix-and-match configurations to get different potential email formats. Here are some possible combinations:
PreserveLength | PreserveDomain | Example Input | Example Output |
---|---|---|---|
false | true | joe@gmail.com | f98723uh@gmail.com |
true | false | joe@gmail.com | 9cd@ms0ej.com |
true | true | joe@gmail.com | mDy@bdo3s.com |
false | false | joe@gmail.com | fweq23f@fheuiw78.edu |