# Email delivery

Starting with version 4.1.0, the app supports two ways of sending "back in stock" emails. You pick one in the app configuration under `Extensions > My Extensions > Apps > Back in stock notification > ... > Configuration`.

## Shopware mailer (recommended)

This is the default. The app uses your shop's built‑in Shopware mailer and a dedicated Shopware email template, so:

* No SMTP credentials are needed — the app re‑uses the mail configuration your shop already has.
* The email template (subject, HTML and plain‑text body, sender name) is editable in the Shopware admin like any other Shopware email template.
* Translations follow your sales channel language the same way as your other shop emails.

### Where to find and edit the template

In the admin, go to `Settings > Shop > Email templates` and open the entry **Back in stock notification** (technical name `shop_studio_back_in_stock_notification`).

![](/files/9hx52gxiN1kVcQzUb3M7)

From there you can edit subject, HTML and plain‑text content per language, just like for the standard Shopware templates.

![](/files/p9K7JvEkXObx1mR1dtHV)

The following placeholders are available in the template:

| Placeholder               | Description                                             |
| ------------------------- | ------------------------------------------------------- |
| `{{ productName }}`       | Name of the product that is back in stock               |
| `{{ productUrl }}`        | Link to the product detail page                         |
| `{{ salesChannel.name }}` | Name of the sales channel — used as default sender name |

{% hint style="info" %}
**Tip**

If the template does not show up yet, save the app configuration once — the app provisions the template automatically on the first successful configuration save for the shop.
{% endhint %}

## Legacy mailer (SMTP)

If you need to keep sending emails through your own SMTP server (for example because you already had the app configured this way in an earlier version), enable **Enable legacy mailer** in the app configuration.

Only when that toggle is on, the `Legacy — Host`, `Legacy — Port`, `Legacy — Username`, `Legacy — Password`, `Legacy — Encryption` and `Legacy — Sender address` fields are used. Make sure at least host, username and sender address are filled in.

{% hint style="warning" %}
**Attention**

The legacy path ignores the Shopware email template above. Subject and content are taken from the app's built‑in defaults and cannot be edited in the admin. For full control over the email content, we recommend leaving legacy mode disabled.
{% endhint %}

## Which mode should I use?

* **New shops / new installations:** leave legacy mailer **disabled** and use the Shopware email template.
* **Upgrading from an older version:** both modes are supported. You can switch to the Shopware mailer at any time by disabling the legacy toggle and saving the configuration — the template is then provisioned automatically.


---

# 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.shop-studio.io/shopware/extensions/back-in-stock-notification-cloud/email-template.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.
