diff --git a/Documentation/ApiOverview/Mail/Index.rst b/Documentation/ApiOverview/Mail/Index.rst index ccc0769d0e..e3240a739c 100644 --- a/Documentation/ApiOverview/Mail/Index.rst +++ b/Documentation/ApiOverview/Mail/Index.rst @@ -412,7 +412,6 @@ Set the current request object for `FluidEmail` In order to use ViewHelpers that need a valid current request, such as :ref:`t3viewhelper:typo3-fluid-uri-page`, pass the current request to the FluidEmail instance: - .. code-block:: php use TYPO3\CMS\Core\Mail\FluidEmail; @@ -421,8 +420,12 @@ pass the current request to the FluidEmail instance: $email->setRequest($this->request); Read more aboout :ref:`Getting the PSR-7 request object ` in different -contexts. In a context where no valid request object can be retrieved, such as in a -:ref:`Console command ` the affected ViewHelpers cannot be used. +contexts. + +In a context where no valid request object can be retrieved, such as in a +:ref:`Console command ` a valid frontend context need to be +simmulated (`Simulating a frontend request in TYPO3 Commands `_) +or the affected ViewHelpers cannot be used. Trying to use these ViewHelpers without a valid request throws an :doc:`error ` like the following: