Emailing Ticket comments to AdminCc

I’m running 3.0.4 w/ MySQL and I’m trying to get the
OnComment:Notify AdminCc:Admin Comment Scrip to work.

Basically, I’m using a custom perl script running out of cron to
not only increase the priority over time, but also to add AdminCc’s and
comments to the ticket. (Yes, this is based on Travis Campbell’s work.)

Anyways, I’m having a problem where when I add the comment to the
ticket, I’m getting an error written to STDOUT:

Recipient names must be specified

I then see in my mail log, an email being sent with no recipients
(sendmail saying: nrcpts=0) and no email is ever recieved.

The odd thing is that I do get emails sent when a ticket is created and
that queue has an AdminCc watcher. (I’ve got another Scrip for On
Create:Notify AdminCc:Transaction, but that of course is running
internal to RT, not my perl script via cron.)

Anyways, I’ve verified that the comment and AdminCc’s are properly being
added to the ticket, it’s just the OnComment:Notify AdminCc Scrip not

Basically the comment code looks like this:

my $QUEUE = ‘testing’;
use RT::Interface::CLI qw(CleanEnv GetCurrentUser GetMessageContent loc);
use RT;
use RT::Tickets;

my $tickets = new RT::Tickets($RT::SystemUser);
$tickets->LimitQueue(VALUE => $QUEUE);
$tickets->LimitStatus(VALUE => ‘open’);
$tickets->LimitStatus(VALUE => ‘new’);

while (my $ticket = $tickets->Next) {
$ticket->AddWatcher(Type => ‘AdminCc’,
Email => ‘’,
Silent => 1);

sub TicketComment {
my $self = shift;
my $priority = shift;

require MIME::Entity;

my $comment = ‘this is a comment’;
$self->Comment(Content => $comment);


Aaron Turner work: 408-543-4025
Sr. Security Engineer fax: 408-543-4078
NetScreen Technologies, Inc
All emails by me are PGP signed; a bad signature indicates a forgery.