How can i search the contents of a transaction when creating a new ticket

Is there a way to search the contents of a transaction on ticket creator so i
can find an email address within the transaction and then use that email
address as the requestor of the new ticket

i have been able to setup a small scrip that will switch between 2 hard
coded requestors but i just dont know how to find the email address stored
within the transactions.

each new ticket on our RT system will be generated when the user fills out
an online form, our website then sends this to our RT system but it contains
the websites email address and not the users who filled in the form.

each transaction will contain something like the following

There has been a message sent via the technical support form

Contact Name: Scott
Company Name: Company
Contact Email Add: email@address
Contact Tel: 123 456789
Licence Number:
Version Number:
Software Product: product
Country: country
Problem: a description of the issue faced by the customer

if anyone could point me in the right direction that would be great

thank you


View this message in context:

solved my own problem.
first it searches for the requestors email address or reference number
matches a certain value
if it does it will then chop up the standard emails contents to get the
users email address
it will then remove the old requestor and add the new requestor

my $trans = $self->TransactionObj;
my $ticket = $self->TicketObj;

my $trigger =“No”;
my $EmailBad = ‘’;

my $out=“”;
my $length=0;
my $fragment=“”;
my $fragmentSearch1="Contact Email Add: ";
my $fragmentSearch2=“Contact Tel:”;

#Set Trigger for switching scrip on

if ($trans->Creator()==‘11434’){
if($ticket->IsWatcher( Type=>“Requestor”, Email => $EmailBad)){
if ($trigger eq ‘YES’){

#get contents and return email address
$length = length($out);
$fragment = substr $out, index($out, $fragmentSearch1);
$fragment = substr $fragment,

#removes one requestor and replaces it with an other

$ticket->DeleteWatcher( Type=>“Requestor”, Email => $EmailBad);
$ticket->AddWatcher(Type => “Requestor”, Email => $fragment);
return 1;

its might not be the most elegant way of doing it but it does the job

View this message in context: