From 58716c69cdc211ae6851412ce4692d7222fb8b04 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 18 Sep 2019 19:41:11 +0200 Subject: [PATCH] Mentioned the mailer debugging options --- mailer.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/mailer.rst b/mailer.rst index c546d64dc2c..203d110ae51 100644 --- a/mailer.rst +++ b/mailer.rst @@ -256,6 +256,23 @@ images inside the HTML contents:: ->html(' ... ...') ; +Debugging Emails +---------------- + +The :class:`Symfony\\Component\\Mailer\\SentMessage` object returned by the +``send()`` method of the :class:`Symfony\\Component\\Mailer\\Transport\\TransportInterface` +provides access to the original message (``getOriginalMessage()``) and to some +debug information (``getDebug()``) such as the HTTP calls done by the HTTP +transports, which is useful to debug errors. + +The exceptions related to mailer transports (those which implement +:class:`Symfony\\Component\\Mailer\\Exception\\TransportException`) also provide +this debug information via the ``getDebug()`` method. + +.. versionadded:: 4.4 + + The ``getDebug()`` methods were introduced in Symfony 4.4. + .. _mailer-twig: Twig: HTML & CSS