File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -1044,6 +1044,15 @@ Before signing/encrypting messages, make sure to have:
10441044 When using OpenSSL to generate certificates, make sure to add the
10451045 ``-addtrust emailProtection `` command option.
10461046
1047+ .. caution ::
1048+
1049+ These features require messages to be rendered,
1050+ which is not always immediate.
1051+ For example, :ref: `templated emails <mailer-twig >` content is generated
1052+ by a :class: `Symfony\\ Component\\ Mailer\\ EventListener\\ MessageListener `.
1053+ If you need to sign and/or encrypt such a message, you need to do so in
1054+ a :ref: `MessageEvent <messageevent >` listener with a negative priority.
1055+
10471056Signing Messages
10481057~~~~~~~~~~~~~~~~
10491058
@@ -1432,13 +1441,6 @@ is sent::
14321441 }
14331442 }
14341443
1435- .. tip ::
1436-
1437- When using a ``MessageEvent `` listener to
1438- :doc: `sign the email contents <signing-and-encrypting-messages >`, run it as
1439- late as possible (e.g. setting a negative priority for it) so the email
1440- contents are not set or modified after signing them.
1441-
14421444Development & Debugging
14431445-----------------------
14441446
You can’t perform that action at this time.
0 commit comments