Item14744: access the recpient's wiki name in email templates
Priority: Normal
Current State: Confirmed
Released In: 2.2.0
Target Release: minor
While we have access to the recpipient's email address using
%EMAILTO
we lack access to the
WikiName even though
available as part of the change set.
Proposal: add
%NAME%
Note that we can't call it
%WIKINAME%
as thats the name of the user executing the mailnotify script.
Patch:
--- a/lib/Foswiki/Contrib/MailerContrib.pm
+++ b/lib/Foswiki/Contrib/MailerContrib.pm
@@ -462,6 +462,7 @@ sub _sendChangesMails {
}
$mail =~ s/%EMAILTO%/$email/g;
+ $mail =~ s/%NAME%/$name/g;
$mail =~ s/%(HTML|PLAIN)_TEXT%/
_generateChangeDetail($name_email, $changeset, $1, $web)/ge;
$mail =~ s/%LASTDATE%/$lastTime/ge;
--
MichaelDaum - 09 Aug 2018