> For the complete documentation index, see [llms.txt](https://docs.digibee.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digibee.com/documentation/developer-guide/development-cycle/build-overview/capsulas/public-capsules/send-notifications-via-email.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.digibee.com/documentation/developer-guide/development-cycle/build-overview/capsulas/public-capsules/send-notifications-via-email.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
