I’m trying to read an email address from a custom header I created and
assign that variable as a ticket cc.
I have RT pulling addresses from the From:, and Cc: fields in the
header, but I want it to pull an address from a custom header (ie.
I have been testing some custom script actions to try and read the
header, but as of yet have been unsuccessful.
I looked through the wiki, and historic rt-users lists, but didn’t find
anything that helped much.
I got this to work once on RT3.4 by manually changing the source code (I
think it was the Notify.pm script) but can’t seem to find documentation
This time around, with RT3.6 I would like to do this with custom script
actions, that seems to be the “cleanest” way to do it.
Here is some of my bumbling so far, I’m trying to tackle the reading
The header field is “X-Isp:”
Condition: On Create
Action: User Defined
my $MIMEObj = $self->TemplateObj->MIMEObj;
my $isp = $MIMEObj->head->get(‘X-Isp’);
$RT::Logger->notice($isp. " <-- this is X-ISP.\n");
This yields me an error in the rt.log:
Commit failed: Can’t call method “head” on an undefined value at (eval
475) line 3.
I’m not sure if there is some additional functions library I need to
include that is not in General.pm, but with my limited knowledge of perl
I’m having a hard time getting through this.
Secnap Network Security
(561) 999-5000 x:4110