> For the complete documentation index, see [llms.txt](https://docs.codegiganten.de/plugin-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codegiganten.de/plugin-documentation/apps/e-mail-gutschein-zum-geburtstag/e-mail-template.md).

# E-Mail-Template

Das E-Mail-Template ist seit der Version 1.1.0 der Erweiterung so strukturiert, dass es automatisch erkennt, ob ein Gutscheincode für die Kund:innen generiert wurde. Falls ja, so wird mit der Variable `{{ promotionIndividualCode.code }}` der Gutscheincode mit der E-Mail versendet - ansonsten wird standardmäßig eine einfache Gratulation versendet.

Der gesamte Text des E-Mail-Templates lässt sich natürlich vollkommen auf die eigenen Wünsche anpassen. Dabei muss beachtet werden, dass `promotionIndividualCode` entweder verwendet oder ausgelassen wird - je nach Konfiguration der Erweiterung.

### Verfügbare Variablen

* `promotionIndividualCode.code`\
  Gibt den Gutscheincode der Person mit Geburtstag aus
* `customer.salutation.letterName`\
  Gibt die Anrede der Person aus
* `customer.firstName`\
  Gibt den Vornamen der Person aus
* `salesChannel.translated.name`\
  Gibt den Namen des Verkaufskanals aus
* `mailHeaderFooter.headerPlain`, `mailHeaderFooter.footerPlain`\
  Gibt die ausgewählten Header und Footer aus

### Betreff

Der Betreff kann natürlich genau wie jeder andere Bestandteil der E-Mail angepasst werden. Standardmäßig lautet dieser:

> Alles Gute zum Geburtstag! Geschenk von `{{ salesChannel.translated.name }}`

### Plain Text

```
{{ mailHeaderFooter.headerPlain|raw }}

{{ customer.salutation.letterName }} {{ customer.lastName }},

herzlichen Glückwunsch zum Geburtstag!
Wir von {{ salesChannel.translated.name }} wünschen Ihnen für das neue Lebensjahr viel Erfolg, Glück und ganz besonders Gesundheit!
{% if promotionIndividualCode is defined %}
Zum Ehrentag möchten wir Ihnen eine große Freude bereiten und schenken Ihnen einen Gutscheincode zum Einlösen in unserem Online-Shop.

Ihr persönlicher Gutscheincode lautet: {{ promotionIndividualCode.code }}
{% endif %}

Wir wünschen {% if promotionIndividualCode is defined %} viel Spaß mit dem Gutschein sowie {% endif %} weiterhin einen schönen Tag und freuen uns, Sie in unserem Shop wieder begrüßen zu dürfen!

Viele Grüße
{{ salesChannel.translated.name }}

{{ mailHeaderFooter.footerPlain|raw }}
```

### HTML

```
{{ mailHeaderFooter.headerHtml|raw }}

<div style="font-family:arial; font-size:12px;">
    <p>{{ customer.salutation.letterName }} {{ customer.lastName }},</p>
    <p>
        herzlichen Glückwunsch zum Geburtstag!<br>
        Wir von {{ salesChannel.translated.name }} wünschen Ihnen für das neue Lebensjahr viel Erfolg, Glück und ganz besonders Gesundheit!
    </p>
    {% if promotionIndividualCode is defined %}
    <p>Zum Ehrentag möchten wir Ihnen eine große Freude bereiten und schenken Ihnen einen Gutscheincode zum Einlösen in unserem Online-Shop.</p>
    <p>Ihr persönlicher Gutscheincode lautet: <b>{{ promotionIndividualCode.code }}</b></p>
    {% endif %}
    <p>Wir wünschen {% if promotionIndividualCode is defined %} viel Spaß mit dem Gutschein sowie {% endif %} weiterhin einen schönen Tag und freuen uns, Sie in unserem Shop wieder begrüßen zu dürfen!</p>
    <p>
        Viele Grüße<br>
        {{ salesChannel.translated.name }}
    </p>
</div>

{{ mailHeaderFooter.footerHtml|raw }}
```

{% hint style="info" %}
Gerne erstellen wir auf Anfrage ein persönliches E-Mail-Template für Sie! [Kontaktieren Sie uns](https://codegiganten.de/kontakt/) dazu gerne unverbindlich.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.codegiganten.de/plugin-documentation/apps/e-mail-gutschein-zum-geburtstag/e-mail-template.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
