Adding comments to a ticket via the API, scrips don't activate?

Hi,

As part of an escalation script, I need to add a comment to the
escalated ticket and then CC this comment to another user. I have
created the following code:

my $commentmail = “ESCALATION TEXT”;

my $emailcontent = MIME::Entity->build(
From => ‘RT Final Escalation root@hostname.com’,
Subject => “Case $tid has escalated.”,
Data => $commentmail);

my %comment_data = (
TimeTaken => “0”,
CCMessageTo => $queueadmin,
MIMEObj => $emailcontent);

$ticket->Comment(%comment_data);

This successfully adds a comment, but does not send any e-mails out.
There are OnComment scrips to send out a notification e-mail with the
standard comment template to the owner and to “Other Recipients”. Do I
need code to trigger the scrips? Or have I made a mistake with the
above code?

Stewart
Stewart Tranter
Computing Services
Loughborough University

E: s.g.tranter@lboro.ac.uk
W: http://www.lboro.ac.uk/computing/
T: +44 (0) 1509 223719
F: +44 (0) 1509 223989

At Wednesday 5/24/2006 10:35 AM, Stewart Tranter wrote:

Hi,

As part of an escalation script, I need to add a comment to the
escalated ticket and then CC this comment to another user. I have
created the following code:

                    CCMessageTo => $queueadmin,

Stewart,

I think the arg name should be CcMessageTo (second ‘c’ is lower case).

Steve