[rt-users] use template from lib
vinita vigine MURUGIAH
vinita at cs.mu.OZ.AU
Tue May 4 23:58:23 EDT 2004
HI
I would like to use template to send auto reject messages to users
-----------------------------------------------------------------------------------------
require RT::Template;
my $template =
RT::Template->new(RT::CurrentUser->new($RT::Nobody));
if (! $template->LoadGlobalTemplate('AutoRejectRequest')){
$RT::Logger->debug("TEST AutoRejectRequest failed");
}else {
my $Content = $template->Content;
my $ii = $template->id;
my $des = $template->Description;
$RT::Logger->debug("TEST AutoRejectRequest Content not
defined") if(! defined $Content);
$RT::Logger->debug("TEST AutoRejectRequest:$ii, $des,
$Content ");
}
-----------------------------------------------------------------------------------------
[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)
[Wed May 5 03:53:22 2004] [debug]: TEST AutoRejectRequest:13, ,
(/usr/local/apps/rt-3.0.8//lib/RT/Interface/Email.pm:577)
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
MailError(
To => $ErrorsTo,
Subject => "Could not load a valid user",
Explanation => $Content,
MIMEObj => $Message,
LogLevel => 'error'
);
--
warm regards
Vinita Vigine Murugiah
Email : vinita at cs.mu.oz.au Ph : (03) 8344 1273
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20040505/fa6bcc6b/attachment.htm>
More information about the rt-users
mailing list