in reply to Re: Sorting and deleting spam emails in the RT queue
in thread Sorting and deleting spam emails in the RT queue

Dear Monks,

Thank you for support., finally i have found a way of deleting the incoming message with the specific subject..


code as below

In the Custom condition specify the transactions that are Type:Correspond (e-mail) and that have "weekly" in the subject. The custom condition could look something like this:


{ my $Transaction = $self->TransactionObj; return $Transaction->Type eq 'Correspond' && $Transaction->Subject =~ +/weekly/; }

In the Custom action preparation code area specify:


return 1;

In the Custom action cleanup code area specify something like this:</P

my $Ticket = $self->TicketObj; $Ticket->SetStatus('resolved'); return 1;