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

# EmailSenderServiceImpl

> Вызов публичных методов сервиса через REST API: emailSenderServiceImpl

<ResponseField name="beanId" type="string">
  Идентификатор Spring bean, который содержит вызываемый сервис.

  emailSenderServiceImpl
</ResponseField>

<ResponseField name="scope" type="string" default="PROTOTYPE">
  Область действия bean. Для вызовов сервисов используется PROTOTYPE.
</ResponseField>

<ResponseField name="functionName" type="string">
  Имя публичного метода сервиса, указанное в сигнатуре ниже.
</ResponseField>

<ResponseField name="args" type="object[]">
  Массив аргументов метода. Каждый аргумент передаётся объектом с индексом 0, 1 и т. д.; значение должно соответствовать Java-типу параметра.
</ResponseField>

## Headers

```http theme={null}
POST /api/v1/bean/request
Content-Type: application/json
Lang-Context: ru
Site-Context: my-site
Authorization: Bearer <token>
```

Заголовки `Lang-Context` и `Site-Context` необходимо передавать в каждом запросе. Для защищённых методов передавайте JWT в заголовке `Authorization` в формате `Bearer <token>`.

**Доступ:** ADMIN. **Bearer Token:** требуется.

* GUEST — без логина; доступен только whitelist.
* USER — требуется авторизация; доступны методы с проверкой USER.
* ADMIN — полный доступ к public-методам всех сервисов.
* Если метод проверяет роль внутри логики, GUEST может получить null.

## Методы

<ResponseField name="getVerificationEmailTemplate" type="String">
  | Аргумент   | Тип      | Описание                      |
  | ---------- | -------- | ----------------------------- |
  | `fullName` | `String` | Передаётся через `args[0].0`. |
  | `token`    | `String` | Передаётся через `args[1].1`. |

  ### getVerificationEmailTemplate

  ```json theme={null}
  {
    "beanId": "emailSenderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getVerificationEmailTemplate",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="getWelcomeEmailTemplate" type="String">
  | Аргумент   | Тип      | Описание                      |
  | ---------- | -------- | ----------------------------- |
  | `fullName` | `String` | Передаётся через `args[0].0`. |

  ### getWelcomeEmailTemplate

  ```json theme={null}
  {
    "beanId": "emailSenderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getWelcomeEmailTemplate",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="getResetPasswordTemplate" type="String">
  | Аргумент   | Тип      | Описание                      |
  | ---------- | -------- | ----------------------------- |
  | `fullName` | `String` | Передаётся через `args[0].0`. |
  | `token`    | `String` | Передаётся через `args[1].1`. |

  ### getResetPasswordTemplate

  ```json theme={null}
  {
    "beanId": "emailSenderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getResetPasswordTemplate",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="getMessageNotificationEmailTemplate" type="String">
  | Аргумент      | Тип      | Описание                      |
  | ------------- | -------- | ----------------------------- |
  | `messageText` | `String` | Передаётся через `args[0].0`. |

  ### getMessageNotificationEmailTemplate

  ```json theme={null}
  {
    "beanId": "emailSenderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getMessageNotificationEmailTemplate",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="getContactSupplierTemplate" type="String">
  | Аргумент      | Тип      | Описание                      |
  | ------------- | -------- | ----------------------------- |
  | `messageText` | `String` | Передаётся через `args[0].0`. |
  | `fullName`    | `String` | Передаётся через `args[1].1`. |
  | `mailTo`      | `String` | Передаётся через `args[2].2`. |

  ### getContactSupplierTemplate

  ```json theme={null}
  {
    "beanId": "emailSenderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getContactSupplierTemplate",
    "args": [
      {
        "0": null,
        "1": null,
        "2": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="getTariffBookingEmailTemplate" type="String">
  | Аргумент   | Тип      | Описание                      |
  | ---------- | -------- | ----------------------------- |
  | `fullName` | `String` | Передаётся через `args[0].0`. |

  ### getTariffBookingEmailTemplate

  ```json theme={null}
  {
    "beanId": "emailSenderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getTariffBookingEmailTemplate",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="sendSimpleEmail" type="void">
  | Аргумент  | Тип      | Описание                      |
  | --------- | -------- | ----------------------------- |
  | `to`      | `String` | Передаётся через `args[0].0`. |
  | `subject` | `String` | Передаётся через `args[1].1`. |
  | `text`    | `String` | Передаётся через `args[2].2`. |

  ### sendSimpleEmail

  ```json theme={null}
  {
    "beanId": "emailSenderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "sendSimpleEmail",
    "args": [
      {
        "0": null,
        "1": null,
        "2": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="sendEmailWithAttachments" type="void">
  | Аргумент      | Тип                 | Описание                      |
  | ------------- | ------------------- | ----------------------------- |
  | `to`          | `String`            | Передаётся через `args[0].0`. |
  | `subject`     | `String`            | Передаётся через `args[1].1`. |
  | `text`        | `String`            | Передаётся через `args[2].2`. |
  | `attachments` | `ArrayList<String>` | Передаётся через `args[3].3`. |

  ### sendEmailWithAttachments

  ```json theme={null}
  {
    "beanId": "emailSenderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "sendEmailWithAttachments",
    "args": [
      {
        "0": null,
        "1": null,
        "2": null,
        "3": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="sendMimeMessage" type="void">
  | Аргумент  | Тип      | Описание                      |
  | --------- | -------- | ----------------------------- |
  | `to`      | `String` | Передаётся через `args[0].0`. |
  | `subject` | `String` | Передаётся через `args[1].1`. |
  | `message` | `String` | Передаётся через `args[2].2`. |

  ### sendMimeMessage

  ```json theme={null}
  {
    "beanId": "emailSenderServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "sendMimeMessage",
    "args": [
      {
        "0": null,
        "1": null,
        "2": null
      }
    ]
  }
  ```
</ResponseField>
