Hey everyone,

For the sake of completeness and mailing list documentation, here's the snippet 
of code I'm using in my template to send an email to each new CC alerting them 
that they've been added to the ticket. The same code would work any time a new 
watcher is added to a ticket. If you use OldValue instead, I think it would 
also work for notifying watchers that they've been removed from a ticket.

To: {
my $watcherid = $Transaction->NewValue;
my $user = RT::User->new( $RT::SystemUser );
$user->Load( $watcherid );
$user->EmailAddress;
}
Subject: New RFC: {$Ticket->Subject}

The $watcherid value is the user id of the person added as CC. Thanks to 
everyone who responded to my original question.

-Tim


-- 
Tim Wilson, Director of Technology
Buffalo-Hanover-Montrose Schools
214 1st Ave NE   Buffalo, MN  55313
ph: 763.682.8740  fax: 763.682.8743  http://www.buffalo.k12.mn.us





_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Reply via email to