Doc officielle: Configuring Email Communications
Fichiers à modifier ou à vérifier:
docker-compose.yml
1 2 3 4 5 |
services: mail: environment: - VIRTUAL_HOST=${MAIL_VIRTUAL_HOST} - VIRTUAL_PORT=${MAIL_VIRTUAL_PORT} |
.env
1 2 3 4 5 |
COMPOSE_PROJECT_NAME=project # HOSTS MAIL_VIRTUAL_HOST=mail.project.local MAIL_VIRTUAL_PORT=8025 |
app/etc/env.php
1 2 3 4 5 6 7 |
'system' => [ 'default' => [ 'system' => [ 'smtp' => [ 'host' => 'mail.project.local', 'port' => '8025' ], |
app/etc/config.php
1 2 3 |
'smtp' => [ 'disable' => '0', ], |
Hosts (VM Ubuntu server tournant sous Windows pour ma part) C:\Windows\System32\drivers\etc\hosts
1 2 |
# Magento 2 192.168.56.101 mail.project.local |
Commandes à exécuter:
- Arrêter/Relancer le conteneur Docker
mail
- Puis,
$ n98-magerun2 setup:upgrade
En backoffice, sous Boutiques > Configuration [Paramètres] > menu colonne de gauche Avancé > Système > volet Paramètres d’envoi des emails, vous devriez avoir ceci:
- Serveur: mail.projet.local
- Port (25): 8025