ReplyBasedUponContent: Difference between revisions

From Request Tracker Wiki
Jump to navigation Jump to search
m (2 revisions imported)
 
(No difference)

Latest revision as of 15:36, 6 April 2016

Here is a simple scrip to send a reply to a email when the contents of the original mail satisfy a particular condition.

Scrip Fields:

Description: Whatever-you-like
Condition: Used Defined
Action: Autoreply to Requestors
Template: roll-your-own-one
Stage: TransactionCreate

In the 'Custom Conditions' field :

my $Attachment = $self->TicketObj->TransactionObj->Attachments;
my $Content = $Attachment->First->Content;
if( $Content =~ m/Open Sesame/ ){
  $Ticket->SetStatus( Status => 'open' , Force => 1,);
  return 1;
}

return;