Skip to content

docs: add documentation page about sending and testing emails - #948

Open
enginydigital wants to merge 3 commits into
dunglas:mainfrom
enginydigital:docs/mailer
Open

docs: add documentation page about sending and testing emails#948
enginydigital wants to merge 3 commits into
dunglas:mainfrom
enginydigital:docs/mailer

Conversation

@enginydigital

Copy link
Copy Markdown

What

Adds a new docs/mailer.md page covering how email works with this template:

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) and
is linked from the README docs index (added after "Support for extra services"):

4. [Sending and testing emails with Mailpit](docs/mailer.md)

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.
Comment thread docs/mailer.md Outdated
the Symfony Flex recipe automatically registers a [Mailpit](https://mailpit.axllent.org/)
service in `compose.override.yaml`:

```yaml

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe could we drop this snippet, so it doesn't get stale?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • YAML snippet: good catch — since the recipe adds the mailer service automatically, I dropped the snippet so it can't get stale.

Comment thread docs/mailer.md

In `.env` (or `.env.local`), point the Mailer to the `mailer` service:

```dotenv

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not done by the recipe?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants