[rt-users] changing status/owner via email pt2

Elaine . cmap_sec at yahoo.co.uk
Tue Jan 25 08:01:06 EST 2005

I tried the code below, no errors in the log, although
it strips out in the fault the Set-Owner or Set-Status
(good) that is logged, there are no emails sent as the
only scrip i have set is user defined and nothing in
that says send an email ? If i then do another scrip
as "on correspond, reply to requestor with template
correspondence" then nothing gets stripped as its in
the other scrip ? Maybe i'm misunderstanding how i
should be setting things up ?

my $AttachObj =
# go out if content is not text!
unless( $AttachObj->ContentType =~ /^text/ ) {

        return 1;

my $content = $AttachObj->Content;
if( $content =~ m/^\QSet-Owner:\E\s*(\S+)\s*$/m ) {

         $self->TicketObj->SetOwner( $1 );
if( $content =~ m/^\QSet-Status:\E\s*(\S+)\s*$/m ) {

         $self->TicketObj->SetStatus( $1 );

# strip special commands from email content
$content =~ s/^\QSet-Status:\E\s*(\S+)\s*$//gm;
$content =~ s/^\QSet-Owner:\E\s*(\S+)\s*$//gm;

# silently overwrite attachment content
$AttachObj->__Set( Field => 'Content', Value =>
$content );


ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com

More information about the rt-users mailing list