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 <[EMAIL PROTECTED]>',
        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:  [EMAIL PROTECTED]
W:  http://www.lboro.ac.uk/computing/
T:  +44 (0) 1509 223719
F:  +44 (0) 1509 223989
------------------------------------------------
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com


We're hiring! Come hack Perl for Best Practical: 
http://bestpractical.com/about/jobs.html

Reply via email to