[rt-users] help with scrip (search correspond body)
Robert Vicchiullo
rob at hautelook.com
Fri Aug 12 16:57:19 EDT 2011
Need a little help and would appreciate any advice.
I am trying to write a scrip for
"On Correspond Notify Requestors and Ccs"
I have Condition set to User defined and stage set to transactionbatch.
In Custom condition I have:
my $Content = $self->TransactionObj->Attachments->First->Content;
$RT::Logger->error($Content);
if( $Content =~ m/Status\:/ ){
$RT::Logger->error("--->found Status...");
return 0;
}
$RT::Logger->error("--->NOT FOUND!!!");
return 1;
but for some reason the content is always blank, and even weirder it somehow gets in the if statement and logs "--->found status..."
so first off why is it not finding the content, I want to simply check the body of the email for a string, which I found multiple places on the wiki and list using the above way. Second why is the if statement finding "Status:" in an empty string??
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110812/b04f3f5e/attachment.htm>
More information about the rt-users
mailing list