[Rt-commit] r8186 - rt/branches/3.6-RELEASE/lib/RT/Action

ruz at bestpractical.com ruz at bestpractical.com
Tue Jul 17 12:27:11 EDT 2007


Author: ruz
Date: Tue Jul 17 12:27:11 2007
New Revision: 8186

Modified:
   rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm

Log:
* clear duplications recipient lists, based on patch from Dirk Pape

Modified: rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm
==============================================================================
--- rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm	(original)
+++ rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm	Tue Jul 17 12:27:11 2007
@@ -133,6 +133,13 @@
 
     $self->RemoveInappropriateRecipients();
 
+    my %seen;
+    foreach my $type qw(To Cc Bcc) {
+        @{ $self->{ $type } } =
+            grep defined && length && !$seen{ lc $_ }++,
+                @{ $self->{ $type } };
+    }
+
     # Go add all the Tos, Ccs and Bccs that we need to to the message to
     # make it happy, but only if we actually have values in those arrays.
 


More information about the Rt-commit mailing list