You are here: Foswiki>Tasks Web>Item14744 (09 Aug 2018, MichaelDaum)Edit Attach

Item14744: access the recpient's wiki name in email templates

pencil
Priority: Normal
Current State: Confirmed
Released In: 2.2.0
Target Release: minor
Applies To: Extension
Component: MailerContrib
Branches:
Reported By: MichaelDaum
Waiting For:
Last Change By: MichaelDaum
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

 

ItemTemplate edit

Summary access the recpient's wiki name in email templates
ReportedBy MichaelDaum
Codebase
SVN Range
AppliesTo Extension
Component MailerContrib
Priority Normal
CurrentState Confirmed
WaitingFor
Checkins
TargetRelease minor
ReleasedIn 2.2.0
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
Topic revision: r1 - 09 Aug 2018, MichaelDaum - This page was cached on 16 Jan 2020 - 14:54.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy