docs: add documentation page about sending and testing emails - #948
Open
enginydigital wants to merge 3 commits into
Open
docs: add documentation page about sending and testing emails#948enginydigital wants to merge 3 commits into
enginydigital wants to merge 3 commits into
Conversation
Adds docs/mailer.md covering how email works with this template: the Flex recipe wiring Mailpit in compose.override.yaml, the dev MAILER_DSN and the 127.0.0.1 pitfall, production transport configuration, and reusing Mailpit on staging. Links the page from the README docs index.
enginydigital
force-pushed
the
docs/mailer
branch
from
June 12, 2026 15:41
02586ba to
cbb0d45
Compare
dunglas
approved these changes
Jul 1, 2026
| the Symfony Flex recipe automatically registers a [Mailpit](https://mailpit.axllent.org/) | ||
| service in `compose.override.yaml`: | ||
|
|
||
| ```yaml |
Owner
There was a problem hiding this comment.
Maybe could we drop this snippet, so it doesn't get stale?
Author
There was a problem hiding this comment.
- YAML snippet: good catch — since the recipe adds the mailer service automatically, I dropped the snippet so it can't get stale.
|
|
||
| In `.env` (or `.env.local`), point the Mailer to the `mailer` service: | ||
|
|
||
| ```dotenv |
Author
There was a problem hiding this comment.
- DSN: the recipe only sets MAILER_DSN=null://null (symfony/mailer 4.3 manifest), it doesn't point it to the mailer service, so this manual step is needed to actually deliver mail to Mailpit. I've made that explicit in the doc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a new
docs/mailer.mdpage covering how email works with this template:compose.override.yamlwheninstalling
symfony/mailer, and how to access its web UI (the ports areexposed without a fixed host mapping, which regularly confuses users).
MAILER_DSNfor development (smtp://mailer:1025), with awarning about the common
127.0.0.1pitfall (Connection could not be established with host "127.0.0.1:1025": stream_socket_client(): Unable to connect t o 127.0.0.1:1025 (Connection refused) #723).compose.override.yaml, so nothing intercepts emails in production and areal transport must be configured via
MAILER_DSN(Mail production #830, discussion Mail production #831).Why
Email configuration is a recurring source of confusion in the issue tracker
(#225, #723, #830, discussion #831). The Flex recipe does the heavy lifting,
but none of it is documented here, so users don't know Mailpit is already
available, how to reach it, or what changes in production.
The page follows the style of the existing docs (
mysql.md,xdebug.md) andis linked from the README docs index (added after "Support for extra services"):