# 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](https://docs.digibee.com/documentation/developer-guide/platform-administration/administration/new-access-control/access-control-roles).
{% 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}
```

![](https://content.gitbook.com/content/jvO5S91EQURCEhbZOuuZ/blobs/BCuutc0lJPFFRcEbFtOA/01.png)

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

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

<br>
