# StPiGhAdditionalMailAddresses

## Description

With this plugin, customers can add multiple email addresses so payment status, order status and delivery notification emails are sent to additional recipients.

## Requirements

* Shopware 6.7
* PHP 8.2, 8.3, 8.4 or 8.5

## Features

* Customers manage additional recipients themselves from a dedicated entry in the account menu.
* Up to three extra email addresses per customer, each with individual toggles for payment, order and delivery notifications.
* Notifications are dispatched as BCC alongside the regular customer mail – no duplicate workflows, no admin intervention.
* Shop operators can enable or disable the feature globally in the plugin configuration.

## Installation

1. Upload the plugin to `custom/plugins/StPiGhAdditionalMailAddresses` or install via the Shopware Store.
2. Install and activate it in the Shopware admin under *Extensions → My extensions*.
3. Clear the cache and rebuild the storefront theme if required.

## Configuration

* Open *Extensions → My extensions*, find *Additional E-Mail Adresses* and click *Configure*.
* Toggle **Activate additional e-mail addresses** to enable or disable the feature shop-wide. Default: enabled.

## Usage

1. The customer logs in to their account.
2. In the account sidebar a new entry **Additional email addresses** is available.
3. The customer enters up to three email addresses and selects which notification types (payment, order, delivery) should be sent to each address.
4. After saving, the chosen addresses automatically receive the configured notification mails as BCC.

## Support

If you encounter any issues or have questions, please [contact our support team](mailto:plugins@stefanpilz.ltd).

## Changelog

### 2.1.0

* Added support for PHP 8.4 and PHP 8.5.

### 2.0.2

* Fixed separator line placement in admin – now targets the outer `sw-inherit-wrapper` (class `sw-form-field-renderer-field__<name>`) so the line sits above the label instead of between label and input.

### 2.0.1

* Added administration SCSS with visual grouping for the three email address blocks in the customer custom fields card (separator line, spacing, indented status checkboxes).

### 2.0.0

* Compatibility with Shopware 6.7.
* Migrated routing from Symfony annotations to PHP 8 attributes.
* Updated controller to use `SalesChannelContext` method parameter instead of request attribute.
* Fixed `MailSendSubscriber` to retrieve `orderId` from event data instead of the removed message method.
* Changed translator type hint to `TranslatorInterface` for dev/prod compatibility.
* Added `_loginRequired` route default for account pages.
* Updated PHP requirement to `^8.2 || ^8.3`.

### 1.0.0

* First version of the plugin for Shopware 6.

## End-User License Agreement (EULA)

Before using this plugin, please read and agree to our [End-User License Agreement](https://stefan-pilz.gitbook.io/stefan-pilz-docs/landing-page/eula). By using this plugin, you agree to the terms and conditions outlined in the EULA.

## About the Author

This plugin is developed and maintained by Stefan Pilz Ltd. (<https://stefanpilz.ltd/>).


---

# 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://stefan-pilz.gitbook.io/stefan-pilz-docs/landing-page/readme.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.
