diff --git a/docs/extra-services.md b/docs/extra-services.md index 545d7bf9e..b39b2380b 100644 --- a/docs/extra-services.md +++ b/docs/extra-services.md @@ -23,3 +23,29 @@ The currently supported packages are: > > We recommend that you use the `composer require` command inside the container > in development mode so that recipes can be applied correctly. + +## Using Another Email Catcher + +The `symfony/mailer` recipe installs Mailpit. +Any other SMTP catcher works in the same place. +To use [Mailtrap Local](https://github.com/mailtrap/mailtrap-local) instead, +replace the `mailer` service in `compose.override.yaml`: + +```yaml +mailer: + image: mailtrap/mailtrap-local + ports: + - "3535" + - "3550" +``` + +Mailtrap Local needs no environment variables. +The recipe sets `MAILER_DSN=null://null`, so change that line in `.env`: + +```dotenv +MAILER_DSN=smtp://mailer:3535 +``` + +Port 3550 serves both the web interface and the JSON API. +Neither port is published on a fixed host port. +Run `docker compose port mailer 3550` to get the web interface address.