I think I figured it out! Because Phonetag still attaches a .wav file, the body of the e-mail is not the first attachment, which is what my scrip was looking for.<div><br></div><div>I don't know how to re-write that part but I'm digging through info now to find out. Of course if anyone can expedite that for me I would appreciate it, but hopefully this helps anyone who wants to do something similar :)</div>
<div><br></div><div>- Steve</div><div><br><br><div class="gmail_quote">On Mon, Dec 1, 2008 at 10:51 AM, Steve Hopps <span dir="ltr"><<a href="mailto:steve.hopps@gmail.com">steve.hopps@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><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 style="border-collapse:collapse"><br></span></div><div><span style="border-collapse:collapse">Here's what I've got in the scrip:<div><span style="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="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="white-space:pre-wrap"><br></span></div><div><span style="white-space:pre-wrap">Custom Action Prep:</span></div>
<div style="color:rgb(80, 0, 80)"><div><span style="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="white-space:pre-wrap">return 1;</span></div><div><span style="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 style="font-family:-webkit-monospace;white-space:pre-wrap">-Steve</span><br></div></div>
</span></div>
</blockquote></div><br></div>