maximaster / file-mailer-transport
Saves served emails as files
Package info
github.com/maximaster/file-mailer-transport
pkg:composer/maximaster/file-mailer-transport
0.0.1
2021-03-01 10:58 UTC
Requires
- php: ^7.1
- psr/log: ^1.0
- symfony/event-dispatcher: ^4.3
- symfony/mailer: ^4.3
This package is auto-updated.
Last update: 2026-03-01 00:34:36 UTC
README
Do you want to save your symfony/mailer emails as files (e.g. .EML)?
You've just found the right package!
Usage
composer require maximaster/file-mailer-transport
services.yaml
Maximaster\FileMailerTransport\TransportFactory: arguments: $projectDir: '%kernel.project_dir%' mailer.default_transport: class: Symfony\Component\Mailer\Transport\TransportInterface factory: '@Maximaster\FileMailerTransport\TransportFactory' arguments: $dsn: '%env(MAILER_DSN)%'
.env
MAILER_DSN=file:///upload/emails/%Y/%m/%d/%T_@hash.eml
Options
- new_directory_mode - with which rights new directory will be created
- hash_algo - controls how
@hashreplacement is calculated - path_renderer - callback which is supposed to render a real file path from a path template