[rt-users] Script to Squelch Queue AdminCc's on Ticket Creation

John Kelsh jkelsh at netspot.com.au
Wed Apr 10 11:15:34 EDT 2013


Hi All,

I've setup the following scrip to squelch Queue AdminCc's where the 
requestor matches a pattern. The scrip seems to be functioning correctly 
yet correspondence is still being sent to Queue AdminCc's.

Is anyone able to shed some light on where I'm going wrong here.

Thanks,


my $requestor = $self->TicketObj->RequestorAddresses;
my $pattern = 'somepattern';

if ( $requestor =~ m/$pattern/ ) {
     $RT::Logger->info( 'Requestor Address: '.$requestor.' matches 
regex: '.$pattern.' squelching output to AdminCc\'s' );
     my @admincc = split( ', ', 
$self->TicketObj->QueueObj->AdminCcAddresses );

     foreach ( @admincc ) {
         $self->TicketObj->SquelchMailTo( $_ );
         $RT::Logger->info( 'Squelched email to: '.$_ );
     }
}

return 1;



More information about the rt-users mailing list