Help needed creating tickets via script.(not scrip)

Heya.

I’m trying to create a ticket from a perl script. everything is fine,
except I get the message

“RT::Action::Autoreply=HASH(0x87565c8): Could not send mail for
RT::Transaction=HASH(0x87255a4)”

However… the requestor is sent an email… this error message does not
happen when a ticket in created via the web interface or email…

the code I have is as follows …

There is only ever 1 requestor, and i’ve confirmed that the requestors array
doesn’t have any weird stuff in it… any ideas??

my $MIMEObj = MIME::Entity->build(Data => @message);

#Load the user
my $CurrentUser = new RT::CurrentUser();
$CurrentUser->LoadByEmail($info->{'Requestor'});
unless ($CurrentUser->id){
  print "Error:Could not load user\r\n";
  exit;
}

print Dumper($CurrentUser);

#make sure the queue is valid
my $QueueObj = new RT::Queue($RT::SystemUser);
unless($QueueObj->Load($info->{'Queue'})){
  print "Error:Invalid Queue\r\n";
  exit;
}
my @requestors = ($CurrentUser->id);
print Dumper(\@requestors);
my $Ticket = new RT::Ticket($CurrentUser);
my ($ticket,$trans,$msg) = $Ticket->Create(Queue => $QueueObj,
                                           Status => 'new',
                                          Subject => $info->{'Subject'},
                                          Requestor => \@requestors,
                                          MIMEObj => $MIMEObj);

if ($ticket == 0 ) {
    print "Error: $msg\r\n";
} else {
    print "TicketID: $ticket\r\n";
}
exit;

Regards
Matthew Watson
Development, Netspace Online Systems
mwatson@netspace.net.au

I’m trying to create a ticket from a perl script. everything is fine,
except I get the message

“RT::Action::Autoreply=HASH(0x87565c8): Could not send mail for
RT::Transaction=HASH(0x87255a4)”

However… the requestor is sent an email… this error message does not
happen when a ticket in created via the web interface or email…

At a rough guess, the user that you are running the script as is not the
user that RT normally runs as. You may be running into odd return values
from sendmail/MTA-of-choice when trying to effectively masquarade as a
different user.

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B                      Operations