[rt-users] Can't send email with rtcrontool
Matt Smith
msmith at gores.com
Fri Feb 13 16:47:38 EST 2015
I'm trying to do a very simple query: Send notice on all tickets older than 2 hours. I can not get the notification to work per the documentation.
Query:
/opt/rt4/bin/rt-crontool --search RT::Search::FromSQL --search-arg "Owner = 'Nobody' AND Status = 'new' AND Created < '2 hours ago'" --action RT::Action::NotifyGroup --action-arg 'email at domain.com' --template 'Blank'
ERROR in log: RT: [3884] Can't call method "CreatorObj" on an undefined value at /opt/rt4/bin/../lib/RT/Action/NotifyGroup.pm line 87.
I've tried a variety of things like using the "transaction" switch and thing, but not sure what is missing. The code that it doesn't like is below:
79 sub SetRecipients {
80 my $self = shift;
81
82 my $arg = $self->Argument;
83 foreach( $self->__SplitArg( $arg ) ) {
84 $self->_HandleArgument( $_ );
85 }
86
87 my $creatorObj = $self->TransactionObj->CreatorObj;
88 my $creator = $creatorObj->EmailAddress();
89 my $TransactionCurrentUser = RT::CurrentUser->new;
90 $TransactionCurrentUser->LoadByName($creatorObj->Name);
91
92 unless (RT->Config->Get('NotifyActor',$TransactionCurrentUser)) {
93 @{ $self->{'To'} } = grep ( !/^\Q$creator\E$/, @{ $self->{'To'} } );
94 }
95
96 $self->{'seen_ueas'} = {};
97
98 return 1;
Any ideas?
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20150213/fc8e54d2/attachment.htm>
More information about the rt-users
mailing list