[freeside-commits] freeside/rt/lib/RT/Interface Email.pm, 1.1.1.14, 1.1.1.14.2.1
Mark Wells
mark at wavetail.420.am
Tue Dec 6 16:58:13 PST 2011
Update of /home/cvs/cvsroot/freeside/rt/lib/RT/Interface
In directory wavetail.420.am:/tmp/cvs-serv9068/rt/lib/RT/Interface
Modified Files:
Tag: FREESIDE_2_3_BRANCH
Email.pm
Log Message:
RT option to exclude certain Cc addresses, #15451
Index: Email.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/lib/RT/Interface/Email.pm,v
retrieving revision 1.1.1.14
retrieving revision 1.1.1.14.2.1
diff -u -w -d -r1.1.1.14 -r1.1.1.14.2.1
--- Email.pm 18 Apr 2011 23:10:19 -0000 1.1.1.14
+++ Email.pm 7 Dec 2011 00:58:11 -0000 1.1.1.14.2.1
@@ -997,13 +997,28 @@
my $user = $args{'CurrentUser'}->UserObj;
return
- grep $_ ne $current_address && !RT::EmailParser->IsRTAddress( $_ ),
+ grep { $_ ne $current_address
+ && !RT::EmailParser->IsRTAddress( $_ )
+ && !IgnoreCcAddress( $_ )
+ }
map lc $user->CanonicalizeEmailAddress( $_->address ),
map Email::Address->parse( $args{'Head'}->get( $_ ) ),
qw(To Cc);
}
+=head2 IgnoreCcAddress ADDRESS
+
+Returns true if ADDRESS matches the $IgnoreCcRegexp config variable.
+=cut
+
+sub IgnoreCcAddress {
+ my $address = shift;
+ if ( my $address_re = RT->Config->Get('IgnoreCcRegexp') ) {
+ return 1 if $address =~ /$address_re/i;
+ }
+ return undef;
+}
=head2 ParseSenderAddressFromHead HEAD
More information about the freeside-commits
mailing list