Email header: add name

In the workflow settings, there is the option to edit the email header. The default entry is "The following message is being delivered on behalf of . ". So I guess it’s intended to add a name there.

However, the people do change. Is there a variable I can add to the header that adds the current user?

In MailTemplate.inc.php I can add

$user = Request::getUser();
$user->getFullName();

but I would prefer to add the names via the UI.

best,
Carola

Hi @carola,

By “via the UI”, do you mean including the text in the email composition window, or something else?

Regards,
Alec Smecher
Public Knowledge Project Team

Anywhere on the website, so that I don’t have to change the code.

Hi @carola,

Go to Management > Settings > Workflow > Emails, and you should find the setup field you’re looking for.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @Alec,

I would like to enter something like “This mail is send to you on behalf of {$username}.” into the setup field, but the variable is not resolved. That’s why I currently add this variable to MailTemplate.inc.php.

best,
Carola

Hi Carola,

Ah, I see. That field is supposed to identify the journal, not the user who’s sending the email; this was introduced because of SPF (Sender Protection Framework) rules that mail servers are increasingly implementing, forcing us to set the “From” address to the journal contact. In order to prevent impersonations (in which someone abused the fact that the From address appeared to be someone else), the message header field should note that the message is being sent on behalf of the journal, but may be written by someone else. It’s intended to be something like a disclaimer.

Regards,
Alec Smecher
Public Knowledge Project Team