Try just having {"This is a test"}, instead of the print. From looking at my
templates, whenever a variable needs to be printed, it's just left bare on a
line.
For example, how $resolved_message is printed in
http://wiki.bestpractical.com/index.cgi?AddTicketHistoryToMail
Also note how {$Ticket->Subject}, {$Ticket->QueueObj->CorrespondAddress()}, and
{Transaction->Content()} are all done without a print.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chuck Danger
Sent: Thursday, February 15, 2007 21:00
To: [email protected]
Subject: [rt-users] new to creating templates
Hi-
I'm sorta new to creating my own templates and to RT in general. One thing I
would like to do is create a custom template that has some perl embedded in
it. The docs I found seem to indicate that I can use the Text::Template method
of embedding perl, i.e., use '{}' to surround the code block, but that does not
seem to work. For a test, I just created a custom template with this (using
Autoreplay as a example, but calling it "AutoTest":
Subject: AutoReply: {$Ticket->Subject}
Greetings,
This message has been automatically generated in response to the
creation of a trouble ticket regarding:
"{$Ticket->Subject()}".
{print "This is a test\n";}
Thank you,
{$Ticket->QueueObj->CorrespondAddress()}
-------------------------------------------------------------------------
{$Transaction->Content()}
When I receive the reply from this template, where it should be printing out
"This is a test", I just get "main::STDOUT".
Thanks-
Chuck C.
________________________________________
Don't get soaked. Take a quick peak at the forecast
with theYahoo! Search weather shortcut.
_______________________________________________
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