[rt-users] Custom Template

Rey Paderna rpaderna at valueclick.com
Wed Oct 5 18:45:25 EDT 2005

Hello List,

I'm new to RT and am currently stuck.  I'm creating a custom AutoReply 
template that needs to access a mysql db on another machine.  I read that RT 
uses Text::Template so I am allowed to embed perl code in it.  Since I'm a 
newbiem I didn't want to delve with scrips yet.  Here is my template:

Subject: AutoReply: {$Ticket->Subject}


Thank you for ....blah..blah..

use DBI;
$dbh=DBI->connect("DBI:mysql:db_name:","user","pass",RaiseError => 1});
$sth1 = $dbh->prepare (qq{Select id from transac where email =
$userid = $sth1->fetchrow_array ();


When I send an email, it responds back with the correct SUbject and all but 
the body is blank.  I've been trying to solve this since this morning to no 
avail. If anyone can point me the correct resource, I would really appreciate 
it.  Thanks.


More information about the rt-users mailing list