> For the complete documentation index, see [llms.txt](https://docs.openstamanager.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openstamanager.com/modules/email/gmail.md).

# Gmail

{% hint style="info" %}
Per configurare correttamente un account email Gmail all'interno di OpenSTAManager è necessario completare nel seguente modo le informazioni dell'elemento del modulo [**Account email**](https://docs.openstamanager.com/modules/email/account.md):
{% endhint %}

* *Server SMTP*: `smtp.gmail.com`
* *Username SMTP*: indirizzo email (<example@gmail.com>, oppure <example@domain.com>)
* *Porta SMTP*: `587`
* *Sicurezza SMTP*: `TLS`

![Screenshot creazione account email gmail](https://854155609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPrbZ0HDR65ONtrhYsV70%2Fuploads%2Fo2lHdC4KjqQ9XddtcWI1%2FAccountEmailGmail.PNG?alt=media)

Se l'account da utilizzare è protetto attraverso il sistema di autenticazione a due fattori, visitare la [sezione relativa](https://github.com/devcode-it/devcode-it.github.io/tree/c372246fd4462ad0101f4f643f1719d85d3d3249/_openstamanager/guide/modules/email/autenticazione-a-due-fattori/README.md). In alternativa, procedere con la guida *Applicazione meno sicure*.

## Applicazione meno sicure

Nel caso **non** sia abilitata l'autenticazione a due fattori, è necessario procedere ad abilitare l'accesso da applicazioni meno sicure attraverso le impostazioni dell'account Google: <https://myaccount.google.com/lesssecureapps>.

![Consenso app meno sicure](https://854155609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPrbZ0HDR65ONtrhYsV70%2Fuploads%2F1eBuByMtbyxZInQmmeVH%2FAppMenoSicure.PNG?alt=media)

E' quindi necessario inserire nel campo *Password SMTP* dell'account del gestionale la password originale dell'account Gmail.

## Autenticazione a due fattori

Se l'autenticazione a due fattori è abilitata, è necessario creare una chiave di accesso Google nella sezione dedicata: <https://myaccount.google.com/apppasswords>.

Una volta visitato il link precedente, comparirà il seguente contenuto. Sarà necessario selezionare il valore `Altra` del campo *Seleziona app*.

![Screenshot autenticazione a due fattori](https://854155609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPrbZ0HDR65ONtrhYsV70%2Fuploads%2Fo4GgIGypE708BX3Bswxr%2FPasswordPerLeApp.PNG?alt=media)

Verrà quindi reso disponibile un campo per la denominazione della nuova chiave. Una volta compilato il nome, cliccare sul pulsante ![](https://github.com/devcode-it/openstamanager-docs/tree/5242b6a23c677db2f5451152c8e4c4aded3a99cf/.gitbook/assets/genera-1.PNG) .

![Screenshot autenticazione a due fattori](https://854155609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPrbZ0HDR65ONtrhYsV70%2Fuploads%2Fv5xmu2g4UQbQ32AUm22h%2FGenera.PNG?alt=media)

Comparirà quindi un messaggio di avvertenza relativo all'utilizzo della nuova chiave, che sarà copiabile dal testo evidenziato in giallo.

![Password per l'app generata](https://854155609-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPrbZ0HDR65ONtrhYsV70%2Fuploads%2FJg94gSYGq8exnZgoVOVv%2FPswGenerata.PNG?alt=media)

E' necessario inserire questa chiave nel campo *Password SMTP* dell'account del gestionale.


---

# 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.openstamanager.com/modules/email/gmail.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.
