Simple API problem

Software: RT 3.0.10 on a linux box, no problems.

Here’s a portion of a short and simple perl script. The idea is to update
and resolve tickets in batch.

while (my $Ticket = $tickets->Next) {
print $Ticket->Subject . “\n”;
my $content = $Ticket->Transactions->First->Content;

[some logic on the content to generate an appropriate
correspondence]

$Ticket->Correspond(Content => "Your password is your email address");
$Ticket->SetStatus( "resolved" );

}

Everything works wonderfully. The Content of the Correspond is added to
the ticket and the status is set to resolved.

The problem? Email doesn’t get sent. Here’s what’s in the log file (with
domain names removed)

Apr 18 20:19:43 rt RT: Use of uninitialized value in concatenation (.) or
string at /opt/rt3010/lib/RT/Action/SendEmail.pm line 300.
(/opt/rt3010/lib/RT.pm:247)
Apr 18 20:19:43 rt RT: Use of uninitialized value in concatenation (.) or
string at /opt/rt3010/lib/RT/Action/SendEmail.pm line 300.
(/opt/rt3010/lib/RT.pm:247)
Apr 18 20:19:43 rt RT: rt-3.0.10-835-3188.10.4211676577761@sampleco.com
sent To: user@sampleco.com Cc: Bcc:
(/opt/rt3010/lib/RT/Action/SendEmail.pm:302)

So, what did I do wrong? What did I fail to setup properly?

dano

Dan O’Neill wrote:

The problem? Email doesn’t get sent. Here’s what’s in the log file (with
domain names removed)

Apr 18 20:19:43 rt RT: rt-3.0.10-835-3188.10.4211676577761@sampleco.com
sent To: user@sampleco.com Cc: Bcc:
(/opt/rt3010/lib/RT/Action/SendEmail.pm:302)

well, it looks like RT thinks it sent the mail. So what do your
mail logs say about it?

I found the solution and it had nothing to do with RT, as usual, it is a
systems administration problem. Someone or something stomped on
/var/qmail/bin/qmail-inject as it was a zero length file and therefore
couldn’t be executed.

Thanks for getting back to me so quickly.On Sun, 18 Apr 2004 pdh@bestpractical.com wrote:

Dan O’Neill wrote:

The problem? Email doesn’t get sent. Here’s what’s in the log file (with
domain names removed)

Apr 18 20:19:43 rt RT: rt-3.0.10-835-3188.10.4211676577761@sampleco.com
sent To: user@sampleco.com Cc: Bcc:
(/opt/rt3010/lib/RT/Action/SendEmail.pm:302)

well, it looks like RT thinks it sent the mail. So what do your
mail logs say about it?