# Send notifications via email

{% hint style="info" %}
To access the Send notifications via email collection and use the features presented in this article, you need the permission PIPELINE:CREATE. Learn more in the[ documentation about Roles](/documentation/developer-guide/platform-administration/administration/new-access-control/access-control-roles.md).
{% endhint %}

The purpose of the Send notifications via email collection is to receive any JSON content at the input in addition to the variables and send it via email.

## Static capsule configuration parameters

* **smtp-email:** account for authentication with the email server.
* ***de*****&#x20;(from):** the sender's address.
* **environment:** specifies the environment of the warning, for example test or prod.
* ***destinatário*****&#x20;(recipient):** recipient to whom the email should be sent. To use a list, specify a JSON array in string format.
* **pipeline:** the name of the pipeline (free text field).
* ***descricao-alerta*****&#x20;(alert description):** title used in the header of the email.
* ***assunto*****&#x20;(subject):** customized subject to identify the email.

## Dynamic capsule configuration parameters

The parameters can also be configured dynamically. To do this, inform the parameters within the `"emailParams" object: {}`.

{% hint style="info" %}
Dynamically informed parameters are overwritten by static parameters.
{% endhint %}

### Input <a href="#input" id="input"></a>

```
{
  "logger": {
    "status": 200,
    "body": {
      "soap:Envelope": {
        "soap:Body": {
          "Erros": {
            "DescricaoErro": "Código de documento 1 não encontrado."
          },
          "ProcessamentoOK": false
        }
      }
    }
  },
  "emailParams": {
    "pipeline": "confirmar-ticket-gera",
    "descricao-alerta": "Erro ao consultar dados para integração.",
    "destinatario": "
test@digibee.com.br
",
    "environment": "TEST",
    "assunto": "Erro Pedido"
  }
}
```

### Output <a href="#output" id="output"></a>

#### Success <a href="#success" id="success"></a>

```
{  "success" : true}
```

![](/files/8qxiMdP8T6VIlJ7Yf4qy)

#### Error <a href="#error" id="error"></a>

```
{   
    "timestamp": 1559243275088,   
    "error": "Error",   
    "code": 500
}
```

<br>


---

# 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.digibee.com/documentation/developer-guide/development-cycle/build-overview/capsulas/public-capsules/send-notifications-via-email.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.
