From d41e9b7b66fa5c8945d5c34494731d0be072a8ea Mon Sep 17 00:00:00 2001 From: Hugo Alliaume Date: Sat, 8 Jun 2019 09:15:56 +0200 Subject: [PATCH 1/2] Mailer: document FileTransport --- mailer.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/mailer.rst b/mailer.rst index 3b83c5454ec..8898b0d8232 100644 --- a/mailer.rst +++ b/mailer.rst @@ -643,6 +643,21 @@ environment: $sender: null $recipients: ['youremail@example.com'] + +Save Messages in Files +---------------------- + +While running integration tests, you may want to save messages in the filesystem. +You can do this by forcing Mailer to use the ``FileTransport`` in only the ``test`` +environment: + +.. code-block:: yaml + + # config/packages/test/mailer.yaml + framework: + mailer: + dsn: 'file://%kernel.project_dir%/var/emails' + .. _`download the foundation-emails.css file`: https://github.com/zurb/foundation-emails/blob/develop/dist/foundation-emails.css .. _`league/html-to-markdown`: https://github.com/thephpleague/html-to-markdown .. _`Markdown syntax`: https://commonmark.org/ From cbc4cfaa5532c6fb7aeea02561b52aa3e1a52a2d Mon Sep 17 00:00:00 2001 From: Hugo Alliaume Date: Wed, 12 Jun 2019 09:06:56 +0200 Subject: [PATCH 2/2] chore(mailer): be more generic for `FileTransport` --- mailer.rst | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/mailer.rst b/mailer.rst index 8898b0d8232..a2c7d6a5b6a 100644 --- a/mailer.rst +++ b/mailer.rst @@ -623,6 +623,19 @@ environment: If you're using Messenger and routing to a transport, the message will *still* be sent to that transport. + +Save Messages in Files +~~~~~~~~~~~~~~~~~~~~~~ + +While developing (or testing), you may want to save messages in the filesystem. +You can do this by forcing Mailer to use the ``FileTransport`` like this: + +.. code-block:: yaml + + # config/packages/test/mailer.yaml + framework: + mailer: + dsn: 'file://%kernel.project_dir%/var/emails' Always Send to the Same Address ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -643,21 +656,6 @@ environment: $sender: null $recipients: ['youremail@example.com'] - -Save Messages in Files ----------------------- - -While running integration tests, you may want to save messages in the filesystem. -You can do this by forcing Mailer to use the ``FileTransport`` in only the ``test`` -environment: - -.. code-block:: yaml - - # config/packages/test/mailer.yaml - framework: - mailer: - dsn: 'file://%kernel.project_dir%/var/emails' - .. _`download the foundation-emails.css file`: https://github.com/zurb/foundation-emails/blob/develop/dist/foundation-emails.css .. _`league/html-to-markdown`: https://github.com/thephpleague/html-to-markdown .. _`Markdown syntax`: https://commonmark.org/