Hi everyone, I'm trying to create a scrip that parses incoming e-mails and
rejects tickets with a certain phrase. I've got the scrip to work on all
tickets created in the queue via the RT web interface, but emails that come
into that queue still make it through. Does anybody know what I could be
missing that would cause it to work on tickets created via the web
interface, but not tickets created via e-mail?
Here's what I've got in the scrip:
----------------------------------------------------
Condition: User Defined
Action: User Defined
Template: Global template: Blank
Stage: TransactionCreate
Custom Condition:
my $Ticket = $self->TicketObj; my $Transaction = $self->TransactionObj; my
$Attachment = $Transaction->Attachments; my $AttFirst = $Attachment->First;
my $Content = $AttFirst->Content; my $test = 0; $test = 1 if (lc($Content)
=~ m/the caller hung up before leaving a message/i); if($test == 1) { return
1; } return;
Custom Action Prep:
$self->TicketObj->SetStatus( "rejected" ); return 1;
Custom Action Cleanup:
return 1;
----------------------------------------------------
I greatly appreciate any help, thanks!
-Steve
_______________________________________________
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