[PATCH] Cleanup initial comments, add copyright notices.
[git.git] / git-send-email-script
index 9061ecd..94d0f1d 100755 (executable)
@@ -1,27 +1,25 @@
 #!/usr/bin/perl -w
-# horrible hack of a script to send off a large number of email messages, one after
-# each other, all chained together.  This is useful for large numbers of patches.
 #
-# Use at your own risk!!!!
-#
-# greg kroah-hartman Jan 8, 2002
-# <greg@kroah.com>
+# Copyright 2002,2005 Greg Kroah-Hartman <greg@kroah.com>
+# Copyright 2005 Ryan Anderson <ryan@michonline.com>
 #
 # GPL v2 (See COPYING)
 # 
 # Ported to support git "mbox" format files by Ryan Anderson <ryan@michonline.com>
 #
-# Sends emails to the email listed on the command line.
+# Sends a collection of emails to the given email addresses, disturbingly fast.
 # 
-# updated to give a valid subject and CC the owner of the patch - Jan 2005
-# first line of the message is who to CC, 
-# and second line is the subject of the message.
+# Supports two formats:
+# 1. mbox format files (ignoring most headers and MIME formatting - this is designed for sending patches)
+# 2. The original format support by Greg's script:
+#    first line of the message is who to CC, 
+#    and second line is the subject of the message.
 # 
 
 use strict;
 use warnings;
 use Term::ReadLine;
-use Mail::Sendmail;
+use Mail::Sendmail qw(sendmail %mailcfg);
 use Getopt::Long;
 use Data::Dumper;
 use Email::Valid;
@@ -29,19 +27,8 @@ use Email::Valid;
 # Variables we fill in automatically, or via prompting:
 my (@to,@cc,$initial_reply_to,$initial_subject,@files,$from);
 
-# Example of them
-# modify these options each time you run the script
-#$to = 'torvalds@osdl.org,git@vger.kernel.org';
+# Example reply to:
 #$initial_reply_to = ''; #<20050203173208.GA23964@foobar.com>';
-#$initial_subject = "[PATCH] Deb package build fixes";
-#@files = (qw(
-#0001-Make-debian-rules-executable-and-correct-the-spelling-of-rsync-in.txt
-#0002-Debian-packages-should-include-the-binaries.txt
-#0003-The-deb-package-building-needs-these-two-new-files-to-work-correctly.txt
-#));
-
-# change this to your email address.
-#$from = "Ryan Anderson <ryan\@michonline.com>";
 
 my $term = new Term::ReadLine 'git-send-email';
 
@@ -180,6 +167,7 @@ sub send_message
                );
 
        $mail{smtp} = 'localhost';
+       $mailcfg{mime} = 0;
 
        #print Data::Dumper->Dump([\%mail],[qw(*mail)]);