Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mailer] Add a way to intercepts emails and save them in filesystem #31819

Kocal opened this issue Jun 3, 2019 · 1 comment


None yet
2 participants
Copy link

commented Jun 3, 2019

My team and I are running E2E tests with Cypress and we are checking if an email has been sent (intercepted and saved on the filesystem) by checking the filesystem.

It works fine with SwiftMailer (Spool Using a File), but we have planned to migrate to the Mailer component and we don't see anything similar in the documentation.


Add support for file protocol, the next part is the directory where emails will be stored:

# config/packages/test/mailer.yaml
        dsn: 'file://%kernel.cache_dir/emails'

What do you think?


This comment has been minimized.

Copy link
Contributor Author

commented Jun 3, 2019

Sorry, it seems to be a duplicate of #31747

EDIT: I'm re-opening this issue, after some proofreading they don't speak about to persist emails but buffer them into memory while running a PHP test.

Also I've seen #31385. That would be great to allow us to register a custom transport, but I think having a native { spool: { type: file } } would be better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.