File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,6 @@ Start with an easy controller action that sends an email::
2626 return $this->render(...);
2727 }
2828
29- .. note ::
30-
31- Don't forget to enable the profiler as explained in :doc: `/testing/profiling `.
32-
3329In your functional test, use the ``swiftmailer `` collector on the profiler
3430to get information about the messages sent on the previous request::
3531
@@ -67,4 +63,22 @@ to get information about the messages sent on the previous request::
6763 }
6864 }
6965
66+ Troubleshooting
67+ ---------------
68+
69+ Problem: The collector object is ``null ``
70+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71+
72+ The email collector is only available when the profiler is enabled and collects
73+ information, as explained in :doc: `/testing/profiling `.
74+
75+ Problem: The collector doesn't contain the email
76+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
77+
78+ If a redirection is performed after sending the email (for example when you send
79+ an email after a form is processed and before redirecting to another page), make
80+ sure that the test client doesn't follow the redirects, as explained in
81+ :doc: `/testing `. Otherwise, the collector will contain the information of the
82+ redirected page and the email won't be accessible.
83+
7084.. _`Swift Mailer` : http://swiftmailer.org/
You can’t perform that action at this time.
0 commit comments