Customs email headers and/or subjects tags

I’m not seeing anywhere in the code where something like %{optional_tags} would get substituted into a header that’s been added to the email custom headers site setting. What I am finding is this method that’s used for setting the value of custom headers:

It’s called from:

I’ll try to get some more details from the Discourse team about how the setting is intended to be used and what values could be substituted into custom headers.