> For the complete documentation index, see [llms.txt](https://edissyum.gitbook.io/open-capture-for-mem/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edissyum.gitbook.io/open-capture-for-mem/technique/gestion-des-erreurs.md).

# Gestion des erreurs

## Notifications en cas d'erreurs

Si une erreur se glisse lors du traitement d'un document, **Open-Capture For MEM** pourra notifier un administrateur. Pour cela, dans le fichier de configuration de la capture des mails, un bloc SMTP vous permet de renseigner les informations de votre serveur SMTP. Pour rappel, le fichier de configuration est situé, à partir de la racine d'**Open-Capture For MEM**, dans `src/config/mail.ini`.

```ini
[GLOBAL]
batch_path             = /opt/edissyum/opencaptureformem/data/MailCollect/
; True or False
smtp_notif_on_error   = False
smtp_auth             = True
smtp_host             = smtp.gmail.com
smtp_port             = 587
smtp_login            = test@gmail.com
; If you have $ in your password, you must double it
smtp_pwd              = test
; True or False
smtp_ssl              = False
; True or False
smtp_starttls         = True
smtp_from_mail        =
smtp_dest_admin_mail  =
; Delay before send another email, in minutes. 0 to disable it
smtp_delay            = 30
```

Afin de valider votre configuration, vous pouvez renseigner vos informations dans le fichier `scripts/MailCollect/smtp_test.py`. Il ne vous restera plus qu'à l'exécuter pour recevoir un mail de test.

```bash
python3 /opt/edissyum/opencaptureformem/scripts/MailCollect/smtp_test.py
```

## Capture de mail

Si vous avez des erreurs lors du lancement de la capture d'e-mail, nous listons ici les différentes erreurs possibles ainsi que les solutions à apporter.

{% hint style="danger" %}
ssl.SSLError: \[SSL: UNSUPPORTED\_PROTOCOL] unsupported protocol (\_ssl.c:1056)
{% endhint %}

Modifiez le fichier suivant et rajoutez le bloc à la fin du fichier. Cette action nécessite un accès `sudo`.

{% code title="/etc/ssl/openssl.cnf" %}

```tsconfig
[tls_system_default]
MinProtocol = TLSv1.0
CipherString = DEFAULT@SECLEVEL=0
```

{% endcode %}


---

# 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://edissyum.gitbook.io/open-capture-for-mem/technique/gestion-des-erreurs.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.
