Skip to content

Commit 07e95e8

Browse files
committed
Mentioned the mailer debugging options
1 parent fddff98 commit 07e95e8

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

mailer.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,23 @@ create an event subscriber to set it automatically::
288288
}
289289
}
290290

291+
Debugging Emails
292+
----------------
293+
294+
The :class:`Symfony\\Component\\Mailer\\SentMessage` object returned by the
295+
``send()`` method of the :class:`Symfony\\Component\\Mailer\\Transport\\TransportInterface`
296+
provides access to the original message (``getOriginalMessage()``) and to some
297+
debug information (``getDebug()``) such as the HTTP calls done by the HTTP
298+
transports, which is useful to debug errors.
299+
300+
The exceptions related to mailer transports (those which implement
301+
:class:`Symfony\\Component\\Mailer\\Exception\\TransportException`) also provide
302+
this debug information via the ``getDebug()`` method.
303+
304+
.. versionadded:: 4.4
305+
306+
The ``getDebug()`` methods were introduced in Symfony 4.4.
307+
291308
.. _mailer-twig:
292309

293310
Twig: HTML & CSS

0 commit comments

Comments
 (0)