portail-associations/MAIL_PROVIDERS.md

70 lines
1.5 KiB
Markdown

# Configuration mail
Le portail supporte maintenant un preset simple par fournisseur avec `SMTP_PROVIDER`.
## 1. OVH
```env
SMTP_PROVIDER=ovh
SMTP_FROM=notifications@votre-domaine.fr
SMTP_USER=notifications@votre-domaine.fr
SMTP_PASS=votre-mot-de-passe-ou-mot-de-passe-app
```
Valeurs automatiques appliquées :
- `SMTP_HOST=smtp.mail.ovh.net`
- `SMTP_PORT=465`
- `SMTP_SECURE=true`
## 2. Gmail
```env
SMTP_PROVIDER=gmail
SMTP_FROM=votre-adresse@gmail.com
SMTP_USER=votre-adresse@gmail.com
SMTP_PASS=votre-mot-de-passe-app
```
Valeurs automatiques appliquées :
- `SMTP_HOST=smtp.gmail.com`
- `SMTP_PORT=465`
- `SMTP_SECURE=true`
Important : pour Gmail, utilise un **mot de passe d'application**.
## 3. Outlook / Microsoft 365
```env
SMTP_PROVIDER=outlook
SMTP_FROM=notifications@votre-domaine.fr
SMTP_USER=notifications@votre-domaine.fr
SMTP_PASS=votre-mot-de-passe-ou-mot-de-passe-app
```
Valeurs automatiques appliquées :
- `SMTP_HOST=smtp.office365.com`
- `SMTP_PORT=587`
- `SMTP_REQUIRE_TLS=true`
## 4. SMTP personnalisé
```env
SMTP_PROVIDER=custom
SMTP_HOST=mail.votre-serveur.fr
SMTP_PORT=587
SMTP_FROM=notifications@votre-domaine.fr
SMTP_USER=notifications@votre-domaine.fr
SMTP_PASS=votre-mot-de-passe
SMTP_SECURE=false
SMTP_REQUIRE_TLS=true
```
## Notes utiles
- Un seul fournisseur est actif par environnement à la fois.
- `SMTP_FROM` reste obligatoire.
- Si `SMTP_USER` est renseigné, `SMTP_PASS` doit l'être aussi.
- Le portail n'enverra pas d'email tant que la configuration restera incomplète.