<html>
<head>
</head>
<body>
HI <br>
I would like to use template to send auto reject messages to users<br>
<br>
-----------------------------------------------------------------------------------------<br>
require RT::Template;<br>
my $template = RT::Template->new(RT::CurrentUser->new($RT::Nobody));<br>
if (! $template->LoadGlobalTemplate('AutoRejectRequest')){<br>
$RT::Logger->debug("TEST AutoRejectRequest failed");<br>
}else {<br>
my $Content = $template->Content;<br>
my $ii = $template->id;<br>
my $des = $template->Description;<br>
<br>
$RT::Logger->debug("TEST AutoRejectRequest Content not defined")
if(! defined $Content);<br>
<br>
$RT::Logger->debug("TEST AutoRejectRequest:$ii, $des, $Content
");<br>
}<br>
-----------------------------------------------------------------------------------------<br>
<br>
[Wed May 5 03:53:22 2004] [debug]: TEST AutoRejectRequest Content not defined
(/usr/local/apps/rt-3.0.8//lib/RT/Interface/Email.pm:575)<br>
[Wed May 5 03:53:22 2004] [debug]: TEST AutoRejectRequest:13, , (/usr/local/apps/rt-3.0.8//lib/RT/Interface/Email.pm:577)<br>
<br>
As yoy can see from the RT log, I get th ID (13) but the content is empty,
How do I get the template content so that I can do<br>
<br>
MailError(<br>
To => $ErrorsTo,<br>
Subject => "Could not load a valid user",<br>
<b> Explanation => $Content,</b><br>
MIMEObj => $Message,<br>
LogLevel => 'error'<br>
);<br>
<br>
<pre class="moz-signature" cols="$mailwrapcol">--
warm regards
Vinita Vigine Murugiah
Email : <a class="moz-txt-link-abbreviated" href="mailto:vinita@cs.mu.oz.au">vinita@cs.mu.oz.au</a> Ph : (03) 8344 1273
</pre>
</body>
</html>