Email variables list - OJS 3

Hi @lsteele,

As you’ve discovered, there isn’t one universal list of email variables. Each template is served a set of variables that are specific to that template’s purpose. For example, {$reviewerName} is only going to be available in the email templates for review assignments.

Having a glossary of email variables is a common request and there’s an issue filed in our development repository.

If you’re comfortable looking at code, you will find a few almost-universal templates that are added to every mail template here:

That shows the following:

  • siteTitle is always available
  • principalContactSignature is always available but must be configured in the site or journal settings
  • contextName and contextUrl are available if the email template is specific to a journal (this will be most of them). “context” is what we call a journal in OJS and a press in OMP.
  • senderEmail and senderName are available if there is a logged-in user making the request to send the email.

If you do a text search of the full source code for assignParams(, you’ll find 47 different instances where unique params are passed to different email templates. It will take some work, but collating that information would be useful.

We haven’t done this ourselves because this information may change with each release. If we were to provide documentation for each version, we’d need some way to generate this documentation automatically. We’d be very happy for help from the community in this regard.