[rt-users] use template from lib
Senoner Samuel
Samuel.Senoner at eurac.edu
Tue May 11 05:54:54 EDT 2004
I also tried for a long time to do this.... without any success.
Can someone help?
Samuel
_____
From: vinita vigine MURUGIAH [mailto:vinita at cs.mu.OZ.AU]
Sent: Wednesday,05 May,2004 05:58
To: rt-users at lists.bestpractical.com
Subject: [rt-users] use template from lib
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/20040511/cefbfc8e/attachment.htm>
More information about the rt-users
mailing list