> 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/pt-br/development-cycle/build-overview/capsulas/public-capsules/send-notifications-via-email.md).

# Enviar alerta por email

Saiba mais sobre a coleção Enviar alerta por email.

{% hint style="info" %}
Para acessar a coleção Enviar alerta por email e usar as funcionalidades presentes nesse artigo, você precisa ter a permissão PIPELINE:CREATE. Aprenda mais na[ documentação sobre Papéis](/documentation/developer-guide/pt-br/platform-administration/administration/new-access-control/access-control-roles.md).
{% endhint %}

O objetivo da coleção Enviar alerta por email é receber qualquer conteúdo JSON na entrada, além das variáveis, ​​e enviá-lo por email.

## Parâmetros estáticos de configuração da cápsula

* **smtp-email:** conta para autenticação com o servidor de email.
* **de:** endereço do remetente.
* ***environment*****:** especifica o ambiente do alerta, por exemplo, test ou prod.
* **destinatário:** destinatário para quem o email deve ser enviado. Para usar uma lista, especifique um *array* JSON em formato de *string*.
* ***pipeline*****:** o nome do *pipeline* (campo de texto livre).
* **descricao-alerta:** título que será usado no cabeçalho do email.
* **assunto:** assunto personalizado para identificar o email.

## Parâmetros dinâmicos de configuração da cápsula&#x20;

Os parâmetros também podem ser configurados dinamicamente. Para isso, informe os parâmetros dentro do objeto `"emailParams": {}`.

{% hint style="info" %}
Os parâmetros informados dinamicamente são substituídos por parâmetros estáticos.
{% endhint %}

### Entrada <a href="#entrada" id="entrada"></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"
  }
}
```

### Saída <a href="#sada" id="sada"></a>

#### Sucesso <a href="#sucesso" id="sucesso"></a>

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

![](https://content.gitbook.com/content/cO0A6g1dOsu8BiHYqO67/blobs/XFMu57rCdUbhhWNgB53E/01pt.png)

#### Erro <a href="#erro" id="erro"></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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
