8000 [Mailer] Add a way to intercepts emails and save them in filesystem · Issue #31819 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Mailer] Add a way to intercepts emails and save them in filesystem #31819
Closed
@Kocal

Description

@Kocal

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

Example

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

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

What do you think?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0