git-svn: extract reusable code into utility functions
[gitweb.git] / git-send-email.perl
index 47afc56915c8ea6e27ae34f3f3c9baa9075536a8..9c6fa6441a0e58abb4a212bce1dc6951683c213e 100755 (executable)
@@ -557,7 +557,11 @@ sub sanitize_address
 sub send_message
 {
        my @recipients = unique_email_list(@to);
-       @cc = (map { sanitize_address($_) } @cc);
+       @cc = (grep { my $cc = extract_valid_address($_);
+                     not grep { $cc eq $_ } @recipients
+                   }
+              map { sanitize_address($_) }
+              @cc);
        my $to = join (",\n\t", @recipients);
        @recipients = unique_email_list(@recipients,@cc,@bcclist);
        @recipients = (map { extract_valid_address($_) } @recipients);
@@ -781,7 +785,8 @@ sub send_message
                        else {
                                push @xh,
                                  'MIME-Version: 1.0',
-                                 "Content-Type: text/plain; charset=$author_encoding";
+                                 "Content-Type: text/plain; charset=$author_encoding",
+                                 'Content-Transfer-Encoding: 8bit';
                        }
                }
        }