[Rt-commit] r8409 - in rt/branches/3.6-RELEASE: .

jesse at bestpractical.com jesse at bestpractical.com
Mon Aug 6 17:33:00 EDT 2007


Author: jesse
Date: Mon Aug  6 17:33:00 2007
New Revision: 8409

Modified:
   rt/branches/3.6-RELEASE/   (props changed)
   rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm

Log:
 r65236 at pinglin:  jesse | 2007-08-06 17:17:56 -0400
 * better canonicalization of multiple addresses in the cc/bcc box on correspondence and comment


Modified: rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm	(original)
+++ rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm	Mon Aug  6 17:33:00 2007
@@ -2410,15 +2410,14 @@
 # The "NotifyOtherRecipients" scripAction will look for RT-Send-Cc: and RT-Send-Bcc:
 # headers
 
-    $args{'MIMEObj'}->head->add( 'RT-Send-Cc', RT::User::CanonicalizeEmailAddress(
-                                                     undef, $args{'CcMessageTo'}
-                                 ) )
-      if defined $args{'CcMessageTo'};
-    $args{'MIMEObj'}->head->add( 'RT-Send-Bcc',
-                                 RT::User::CanonicalizeEmailAddress(
-                                                    undef, $args{'BccMessageTo'}
-                                 ) )
-      if defined $args{'BccMessageTo'};
+
+    foreach my $type (qw/Cc Bcc/) {
+        if ( defined $args{ $type . 'MessageTo' } ) {
+            
+            my $addresses = join(', ', ( map { RT::User::CanonicalizeEmailAddress( undef, $_->address ) } Mail::Address->parse( $args{ $type . 'MessageTo' } ) ));
+                $args{'MIMEObj'}->head->add( 'RT-Send-' . $type, $addresses );
+        }
+    }
 
     # If this is from an external source, we need to come up with its
     # internal Message-ID now, so all emails sent because of this


More information about the Rt-commit mailing list