Skip to content

Update Swiftmailer configuration docs #7152

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

Closed
wants to merge 9 commits into from
1 change: 1 addition & 0 deletions email.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ The following configuration attributes are available:
* ``type`` (how to queue the messages, ``file`` or ``memory`` is supported, see :doc:`/email/spool`)
* ``path`` (where to store the messages)
* ``delivery_address`` (an email address where to send ALL emails)
* ``delivery_addresses`` (an array of email addresses where to send ALL emails)
* ``disable_delivery`` (set to true to disable delivery completely)

Sending Emails
Expand Down
6 changes: 3 additions & 3 deletions email/dev_environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ will not be sent when you run tests, but will continue to be sent in the
If you'd also like to disable deliver in the ``dev`` environment, simply
add this same configuration to the ``config_dev.yml`` file.

Sending to a Specified Address
Sending to a Specified Address(es)
------------------------------
Copy link
Member

Choose a reason for hiding this comment

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

you need to make the underlining longer here as the title is longer


You can also choose to have all email sent to a specific address, instead
You can also choose to have all email sent to a specific address or a list of addresses, instead
of the address actually specified when sending the message. This can be done
via the ``delivery_address`` option:
via the ``delivery_address`` or ``delivery_addresses`` option:

.. configuration-block::

Expand Down
13 changes: 11 additions & 2 deletions reference/configuration/swiftmailer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,21 @@ that all emails sent during development go to a single account.
This uses ``Swift_Plugins_RedirectingPlugin``. Original recipients are available
on the ``X-Swift-To``, ``X-Swift-Cc`` and ``X-Swift-Bcc`` headers.

delivery_addresses
~~~~~~~~~~~~~~~~~~

**type**: ``array``

If set, all email messages will be sent to this list of addresses, using the same logic as ``delivery_address``.

delivery_whitelist
~~~~~~~~~~~~~~~~~~

**type**: ``array``

Used in combination with ``delivery_address``. If set, emails matching any
Used in combination with ``delivery_address`` or ``delivery_addresses``. If set, emails matching any
of these patterns will be delivered like normal, as well as being sent to
``delivery_address``. For details, see the
``delivery_address`` or ``delivery_addresses``. For details, see the
:ref:`How to Work with Emails during Development <sending-to-a-specified-address-but-with-exceptions>`
article.

Expand Down Expand Up @@ -208,6 +215,7 @@ Full Default Configuration
threshold: 99
sleep: 0
delivery_address: ~
delivery_addresses: []
disable_delivery: ~
logging: '%kernel.debug%'

Expand All @@ -230,6 +238,7 @@ Full Default Configuration
auth_mode=""
sender_address=""
delivery_address=""
Copy link
Member

Choose a reason for hiding this comment

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

Should this delivery_address option be removed to?

Copy link
Member

Choose a reason for hiding this comment

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

done

delivery_addresses=""
disable_delivery=""
logging="%kernel.debug%"
>
Expand Down