How to work with custom mail template?

Hello experts!


We wrote a script, the result from this script, we want it to be displayed in the letter that is sent to the user by event.


I created a mail template, i write                  $SCRIPT(ССС_Test)$

The recipient receives                                   $SCRIPT(ССС_Test)$


And there must be a value, how to fix it?