[rt-devel] notification with template in email.pm
Senoner Samuel
Samuel.Senoner at eurac.edu
Tue Oct 7 09:39:31 EDT 2003
I want to reject a mail and response with the template
autorejectrequest,
but I get only the message with the original request back,
here the modified part of /RT/Interfaces/Email.pm
# If the plugins refused to create one, they lose.
unless ($AuthStat == -1) {
# Notify the RT Admin of the failure.
# XXX Should this be configurable?
#load the autoreject template and add this to the error
require RT::Template;
my $template = RT::Template->new($RT::SystemUser);
$template->Load('AutoRejectRequest');
return ( 0, $RT::Logger->debug('Template not found') ) unless
$template->Id;
$RT::Logger->debug("message " . $Message . "template
".$template->Id . " content " . $template->Content);
my $explain = $template->Content;
MailError(
To => $RT::OwnerEmail,
Subject => "Could not load a valid user",
Explanation => <<EOT,
RT could not load a valid user, and RT's configuration does not allow
for the creation of a new user for this email ($ErrorsTo).
You might need to grant 'Everyone' the right 'CreateTicket' for the
queue $args{'queue'}.
EOT
MIMEObj => $Message,
LogLevel => 'error' );
# Also notify the requestor that his request has been dropped.
MailError(
To => $ErrorsTo,
Subject => "Could not load a valid user",
Explanation => $explain, #<<EOT,
#RT could not load a valid user, and RT's configuration does not allow
#for the creation of a new user for your email.
#
#$template->Content
#
#EOT
MIMEObj => $Message,
LogLevel => 'error' );
}
return ( 0, "Could not load a valid user", undef );
}
Can someone help me?
Thanks
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://pallas.eruditorum.org/pipermail/rt-devel/attachments/20031007/afe4c17d/attachment.html
More information about the Rt-devel
mailing list