Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Users

Username and email address template is sent to

 

 

Request Tracker users RSS feed   Index | Next | Previous | View Threaded


bwiese at ElementPS

Feb 22, 2012, 10:17 AM

Post #1 of 2 (355 views)
Permalink
Username and email address template is sent to

I'm trying to find out how to print the username and email address of the person a template is being email to.

So, for example, when you comment on a ticket, I want to add the following into the template:

"This email was sent to Joe Blow (jblow [at] nowhere<mailto:jblow [at] nowhere>)."

Thanks,
Brent


ruz at bestpractical

Feb 22, 2012, 11:16 AM

Post #2 of 2 (340 views)
Permalink
Re: Username and email address template is sent to [In reply to]

On Wed, Feb 22, 2012 at 22:17, Brent Wiese <bwiese [at] elementps> wrote:
> I’m trying to find out how to print the username and email address of the
> person a template is being email to.
>
>
>
> So, for example, when you comment on a ticket, I want to add the following
> into the template:
>
>
>
> “This email was sent to Joe Blow (jblow [at] nowhere).”
>

Templates don't have access to this info in stock RT. It's easy to
adjust. Patch the following lines in lib/RT/Action/SendEmail.pm:

151 sub Prepare {
152 my $self = shift;
153
154 my ( $result, $message ) = $self->TemplateObj->Parse(
155 Argument => $self->Argument,
156 TicketObj => $self->TicketObj,
157 TransactionObj => $self->TransactionObj,
ScripObj => $self,
158 );


Above change allows you to access $ScripObj in templates. See
lib/RT/Action/Notify.pm to understand how recipients are storred in
the object.

Note that template itself can add recipients. Also, note that
RemoveInappropriateRecipients and other filters that may drop
recipients or delay delivery are called later. So information you add
to an email may mismatch reality.

> Thanks,
>
> Brent
>
>
> --------
> RT Training Sessions (http://bestpractical.com/services/training.html)
> * Boston — March 5 & 6, 2012



--
Best regards, Ruslan.
--------
RT Training Sessions (http://bestpractical.com/services/training.html)
* Boston March 5 & 6, 2012

Request Tracker users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.