[rt-users] RT 3.0.8 command line problems

Todd Chapman rt at chaka.net
Thu Feb 19 14:44:10 EST 2004


I am trying to process an e-mail using a script (via
procmail) and then call the rt CLI to create the
ticket. The problem is that the text of the text contains
newlines and other possible bad characters. I have escaped
the quotes but I can't get it to work.

Here's the code:

        $out .= $body->as_string;
        $out =~ s/\"/\\\"/gs;
        my $arg = "create -t ticket set subject=\"$subject\" set requestor=$requestor set queue=Test set text=\"$out\"";
        system "/opt/rt3/bin/rt $arg";


The error I get is: rt: edit: No variables to set.

I can get it to work by escaping the newlines but I want
my newlines to be preserved.

Can anyone suggest an easy, non-interactive way to get this
to work?

Thanks!

-Todd



More information about the rt-users mailing list