<span class="Apple-style-span" style="border-collapse: collapse; ">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?</span><div>
<span class="Apple-style-span" style="border-collapse: collapse;"><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; ">Here's what I've got in the scrip:<div><span style="font-family: '-webkit-monospace'; white-space: pre-wrap; ">----------------------------------------------------</span><br>
</div><div>Condition: User Defined</div><div>Action: User Defined</div><div>Template: Global template: Blank</div><div>Stage: TransactionCreate</div><div><br></div><div>Custom Condition:</div><div><span style="font-family: '-webkit-monospace'; white-space: pre-wrap; ">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;</span><br></div><div><span style="font-family: '-webkit-monospace'; white-space: pre-wrap; "><br></span></div><div><span style="font-family: '-webkit-monospace'; white-space: pre-wrap; ">Custom Action Prep:</span></div>
<div class="Ih2E3d" style="color: rgb(80, 0, 80); "><div><span style="font-family: '-webkit-monospace'; white-space: pre-wrap; ">$self->TicketObj->SetStatus( "rejected" );
return 1;<br></span></div></div><div><div><br></div><div>Custom Action Cleanup:</div><div><span style="font-family: '-webkit-monospace'; white-space: pre-wrap; ">return 1;</span></div><div><span style="font-family: '-webkit-monospace'; white-space: pre-wrap; ">----------------------------------------------------</span></div>
<div><br></div><div>I greatly appreciate any help, thanks!</div><div><br></div><div><br></div><div><span class="Apple-style-span" style="font-family: -webkit-monospace; white-space: pre-wrap; ">-Steve</span><br></div></div>
</span></div>