Subject: | Add option to redirect error emails |
Date: | Tue, 28 Oct 2008 18:55:17 -0700 |
To: | bug-RT-Extension-CommandByMail [...] rt.cpan.org |
From: | "Bryan McLellan" <btm [...] loftninjas.org> |
I wrote this patch a while ago [1] and keep coming back finding it
useful. These modifications to TakeAction.pm allow you to configure
where errors go. This is useful if you want to use command-by-mail,
but don't want your users getting an obtuse error email if they start
their email off with a link. (Or most recent was "WHAT:").
RT_SiteConfig.pm:
Set($ErrorEmailAddress, 'noc@example.com');
diff TakeAction.pm.orig TakeAction.pm
663c663,668
< my $ErrorsTo =
RT::Interface::Email::ParseErrorsToAddressFromHead(
$args{'Message'}->head );
---
Show quoted text
> my $ErrorsTo = '';
> if ( defined( $RT::ErrorEmailAddress ) ) {
> $ErrorsTo = $RT::ErrorEmailAddress;
> } else {
> $ErrorsTo = RT::Interface::Email::ParseErrorsToAddressFromHead( $args{'Message'}->head );
> }
[1] http://blog.loftninjas.org/?p=237