[Rt-commit] r17335 - in rt/3.8/trunk: .

jesse at bestpractical.com jesse at bestpractical.com
Wed Dec 24 14:23:24 EST 2008


Author: jesse
Date: Wed Dec 24 14:23:23 2008
New Revision: 17335

Modified:
   rt/3.8/trunk/   (props changed)
   rt/3.8/trunk/lib/RT/Action/SendEmail.pm

Log:
 r56240 at 173-114-53-99:  jesse | 2008-12-24 14:19:49 -0500
 * Improve SendEmail's handling of squelched email address canonicalization


Modified: rt/3.8/trunk/lib/RT/Action/SendEmail.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Action/SendEmail.pm	(original)
+++ rt/3.8/trunk/lib/RT/Action/SendEmail.pm	Wed Dec 24 14:23:23 2008
@@ -810,8 +810,9 @@
     # Cycle through the people we're sending to and pull out anyone on the
     # system blacklist
 
-    # Trim leading and trailing spaces. # Todo - we should really be canonicalizing all addresses
-    s/\s//g foreach @blacklist;
+    # Trim leading and trailing spaces. 
+    @blacklist = map { RT::User->CanonicalizeEmailAddress( $_->address ) } Email::Address->parse(join(', ', grep {defined} @blacklist));
+
     foreach my $type (@EMAIL_RECIPIENT_HEADERS) {
         my @addrs;
         foreach my $addr ( @{ $self->{$type} } ) {


More information about the Rt-commit mailing list