Skip to content

Commit 1f505a8

Browse files
committed
[Mailer] Document the mailer:test command
1 parent a7eb5dc commit 1f505a8

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

mailer.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,6 +1407,25 @@ Here's an example of making one available to download::
14071407
Development & Debugging
14081408
-----------------------
14091409

1410+
Sending Test Emails
1411+
~~~~~~~~~~~~~~~~~~~
1412+
1413+
Symfony provides a command to send emails, which is useful during development
1414+
to test if sending emails works correctly:
1415+
1416+
.. code-block:: terminal
1417+
1418+
# the only mandatory argument is the recipient address
1419+
# (check the command help to learn about its options)
1420+
$ php bin/console mailer:test [email protected]
1421+
1422+
This command bypasses the :doc:`Messenger bus </messenger>`, if configured, to
1423+
ease testing emails even when the Messenger consumer is not running.
1424+
1425+
.. versionadded:: 6.2
1426+
1427+
The ``mailer:test`` command was introduced in Symfony 6.2.
1428+
14101429
Disabling Delivery
14111430
~~~~~~~~~~~~~~~~~~
14121431

0 commit comments

Comments
 (0)