# Email

Scrambles the characters in an email address. It preserves formatting and keeps the `@` and `.` characters.

For example, for the following input value:

`johndoe@company.com`

The output value would be something like:

`brwomse@xorwxlt.slt`

By default, the generator scrambles the domain. You can configure the generator to not mask specific domains. You can also specify a domain to use for all of the output email addresses.

For example, if you configure the generator to not scramble the domain `company.com`, then the output for `johndoe@company.com` would look something like:

`brwomse@company.com`

This generator securely masks letters and numbers. There is no way to recover the original data.

If your email addresses include name values - for example, <John.Smith@mycompany.com> - then you can use the Regex Mask generator to produce email addresses that are tied to name values in the same table. For information on how to do this, go to [Generator hints and tips](/app/generation/generators-assign-config/common-usage.md#generator-tips-email-name-alignment).

## Characteristics <a href="#email-characteristics" id="email-characteristics"></a>

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top"><strong>Consistency</strong></td><td valign="top">Yes, can be made self-consistent.</td></tr><tr><td valign="top"><strong>Linking</strong></td><td valign="top">No, cannot be linked.</td></tr><tr><td valign="top"><strong>Differential privacy</strong></td><td valign="top">No</td></tr><tr><td valign="top"><strong>Data-free</strong></td><td valign="top">No</td></tr><tr><td valign="top"><strong>Allowed for primary keys</strong></td><td valign="top">No</td></tr><tr><td valign="top"><strong>Allowed for unique columns</strong></td><td valign="top">No</td></tr><tr><td valign="top"><strong>Uses format-preserving encryption (FPE)</strong></td><td valign="top">No</td></tr><tr><td valign="top"><strong>Privacy ranking</strong></td><td valign="top"><ul><li>3 if not consistent</li><li>4 if consistent</li></ul></td></tr><tr><td valign="top"><strong>Generator ID (for the API)</strong></td><td valign="top"><a href="/pages/cSiodmqjXSXTjm030plR"><code>EmailGenerator</code></a></td></tr></tbody></table>

## How to configure <a href="#email-configure" id="email-configure"></a>

To configure the generator:

1. In the **Email Domain** field, enter a domain to use for all of the output values.\
   \
   For example, use `@mycompany.com` for all of the generated values. The generator scrambles the content before the `@`.
2. In the **Excluded Email Domains** field, enter a comma-separated list of domains for which email addresses are not masked in the output values.\
   \
   This allows you, for example, to maintain internal or testing email addresses that are not considered sensitive.
3. Toggle the **Replace invalid emails** setting to indicate whether to replace an invalid email address with a generated valid email address.\
   \
   By default, invalid email addresses are not replaced.\
   \
   In the replacement values, the username is generated. If you specify a value for **Email Domain**, then the email addresses use that domain. Otherwise, the domain is generated.
4. Toggle the **Consistency** setting to indicate whether to make the column self-consistent.\
   \
   By default, consistency is disabled.
5. If [Structural data encryption](/app/generation/generators-assign-config/generators-data-encryption-config.md) is enabled, then to use it for this column, in the advanced options section, toggle **Use data encryption process** to the on position.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tonic.ai/app/generation/generators/generator-reference/email.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
