> ## Documentation Index
> Fetch the complete documentation index at: https://dokumentation.websale.de/llms.txt
> Use this file to discover all available pages before exploring further.

# newsletter - Newsletter

> The newsletter node bundles newsletter sign-up and sign-off, double opt-in confirmations and configuration of the associated email forms and content.

export const KonfigDeeplink = ({node}) => <>
    You can open this setting directly in the Admin Interface via the following link:{" "}
    <code>{`https://<shop-domain>/admin/config/${node}`}</code>{" "}
    (<a href="/en/admin-interface/konfigurations-deeplinks">Deeplink overview</a>)
  </>;

export const TextbausteinHinweis = () => <>
    Dieser Text wird über einen Textbaustein realisiert.<br />
    Alles zu Textbausteinen in Konfigurationen finden Sie{" "}
    <a href="https://dokumentation.websale.de/konfiguration#verwendung-von-textbausteinen-in-konfigurationen">hier</a>.
  </>;

The `newsletter` node bundles everything around newsletter sign-up and sign-off as well as the associated emails. Here you can define, for example, whether a confirmation (double opt-in) is required for various actions and how the email forms are presented and what they should contain.

***

## `newsletter*` - Basic structure

The basic structure of the `newsletter` node is shown below:

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "newsletter": {
    "field": { },
    "newsletter": { }
  }
}
```

#### Parameter description

| **Parameter** | **Description**                                 |
| ------------- | ----------------------------------------------- |
| `field`       | Defines a single field for the newsletter form. |
| `newsletter`  | Defines basic newsletter functions.             |

***

## `newsletter.field` - Form field for newsletter

The `newsletter.field` node defines a single field of the newsletter form. This lets you specify, for example, the label, the field type and validations. The frontend renders the input according to these specifications.

<KonfigDeeplink node="newsletter.field" />

#### Example configuration (add "First name" field)

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "newsletter": {
    "fields": {
      "firstName": {
        "name": "firstName",
        "label": "<Textbaustein>",
        "required": false,
        "type": "text",
        "validations": [
          {
            "service": "formCheck.minlen",
            "options": {
              "len": 3
            }
          },
          {
            "service": "formCheck.maxlen",
            "options": {
              "len": 50
            }
          }
        ]
      }
    }
  }
}
```

#### Parameter description

| **Parameter** | **Type**     | **Description**                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`        | string       | Technical name of the form field. <br />Must be unique and is chosen by you.<br />Used when submitting the form as well as for import / export.                                                                                                                                                                                                                                                                   |
| `label`       | string       | Display name in the [Admin Interface](/en/admin-interface). <br /><br /><TextbausteinHinweis />                                                                                                                                                                                                                                                                                                                   |
| `required`    | bool         | Marks the field as required.  <br />Default: `true`                                                                                                                                                                                                                                                                                                                                                               |
| `type`        | enum         | Specifies the field type.      <br />Possible values:  <br />- `text` — free text field. <br />- `salutation` — selection of a [salutation](/en/konfiguration/general-allgemeine-shopeinstellungen#general-salutation-anreden) configured in the shop.<br />- `title` — selection of a [title](/en/konfiguration/general-allgemeine-shopeinstellungen#general-title-titel-für-die-anrede) configured in the shop. |
| `validations` | multiService | List of validation rules to check the field content.<br />Only supported for free text fields (`type: text`).  <br />More under [Validation and check services](/en/konfiguration/validierungs-und-prufservices).<br />Target: `inputValidation`                                                                                                                                                                  |

***

## `newsletter.newsletter` - Newsletter settings

The `newsletter.newsletter` node controls all basic newsletter functions, for example double opt-in and sign-up / sign-off. Templates, subject lines, sender details and much more can be specified.

<KonfigDeeplink node="newsletter.newsletter" />

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "blacklistSelfDoubleOptIn": true,
  "doubleOptInEmailBlacklist": {
    "fromAddress": "no-reply@websale.de",
    "fromName": "WEBSALE",
    "subject": "Bestätigen Sie Ihre Blacklist Anmeldung",
    "template": "newsletterBlacklist.htm"
  },
  "doubleOptInEmailSubscribe": {
    "fromAddress": "no-reply@websale.de",
    "fromName": "WEBSALE",
    "subject": "Bestätigen Sie Ihre Registrierung",
    "template": "newsletterSubscribe.htm"
  },
  "doubleOptInEmailUnsubscribe": {
    "fromAddress": "no-reply@websale.de",
    "fromName": "WEBSALE",
    "subject": "Bestätigen Sie Ihre Abmeldung",
    "template": "newsletterUnsubscribe.htm"
  },
  "fields": [
    "newsletter.field.firstName",
    "newsletter.field.lastName",
    "newsletter.field.salutation"
  ],
  "importSubscribeDoubleOptIn": true,
  "unsubscribeAdminDoubleOptIn": true,
  "unsubscribeSelfDoubleOptIn": true,
  "welcomeEmail": {
    "fromAddress": "no-reply@websale.de",
    "fromName": "WEBSALE",
    "subject": "Herzlich Willkommen im Newsletter",
    "template": "newsletterWelcome.htm"
  }
}
```

#### Parameter description

| **Parameter**                 | **Type**   | **Description**                                                                                                                                                                                                                                                                               |
| ----------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `blacklistSelfDoubleOptIn`    | bool       | If someone wants to unsubscribe from the newsletter themselves, they must confirm this via a confirmation email (double opt-in).      <br />Default: `true`                                                                                                                                   |
| `doubleOptInEmailBlacklist`   | object     | Settings for the confirmation email on unsubscribe / block.                                                                                                                                                                                                                                   |
| `fromAddress`                 | string     | Sender email of the confirmation email.                                                                                                                                                                                                                                                       |
| `fromName`                    | string     | Sender name of the confirmation email.                                                                                                                                                                                                                                                        |
| `subject`                     | string     | Subject of the confirmation email.                                                                                                                                                                                                                                                            |
| `template`                    | string     | Name / file of the email template to be used.                                                                                                                                                                                                                                                 |
| `doubleOptInEmailSubscribe`   | object     | Settings for the confirmation email on newsletter sign-up.                                                                                                                                                                                                                                    |
| `fromAddress`                 | string     | Sender email of the sign-up email.                                                                                                                                                                                                                                                            |
| `fromName`                    | string     | Sender name of the sign-up email.                                                                                                                                                                                                                                                             |
| `subject`                     | string     | Subject of the sign-up email.                                                                                                                                                                                                                                                                 |
| `template`                    | string     | Name / file of the email template to be used.                                                                                                                                                                                                                                                 |
| `doubleOptInEmailUnsubscribe` | object     | Setting for the confirmation email on newsletter sign-off.                                                                                                                                                                                                                                    |
| `fromAddress`                 | string     | Sender email of the sign-off email.                                                                                                                                                                                                                                                           |
| `fromName`                    | string     | Sender name of the sign-off email.                                                                                                                                                                                                                                                            |
| `subject`                     | string     | Subject of the sign-off email.                                                                                                                                                                                                                                                                |
| `template`                    | string     | Name / file of the email template to be used.                                                                                                                                                                                                                                                 |
| `fields`                      | multiAssoc | Linked form fields for the newsletter sign-up.   <br />The fields defined under `newsletter.field` are referenced here.<br />A separate field for the email address does not have to be specified — it is always automatically passed under the name `email`.<br />Target: `newsletter.field` |
| `importSubscribeDoubleOptIn`  | bool       | Imported email addresses must also confirm their newsletter sign-up via a confirmation email.   <br /> Default: `true`                                                                                                                                                                        |
| `unsubscribeAdminDoubleOptIn` | bool       | If an administrator unsubscribes someone from the newsletter, the recipient must confirm the sign-off via a confirmation email.    <br />Default: `true`                                                                                                                                      |
| `unsubscribeSelfDoubleOptIn`  | bool       | When unsubscribing yourself from the newsletter, a sign-off via confirmation email is required.    <br />Default: `true`                                                                                                                                                                      |
| `welcomeEmail`                | object     | Settings for the welcome email after successful newsletter sign-up.                                                                                                                                                                                                                           |
| `fromAddress`                 | string     | Sender email of the welcome email.                                                                                                                                                                                                                                                            |
| `fromName`                    | string     | Sender name of the welcome email.                                                                                                                                                                                                                                                             |
| `subject`                     | string     | Subject of the welcome email.                                                                                                                                                                                                                                                                 |
| `template`                    | string     | Name / file of the email template to be used.                                                                                                                                                                                                                                                 |
