[siesta-commit] siesta/lib/Siesta/Plugin Send.pm,1.15,1.16

[prev] [thread] [next] [lurker] [Date index for 2002/08/22]

From: clampr
Subject: [siesta-commit] siesta/lib/Siesta/Plugin Send.pm,1.15,1.16
Date: 22:06 on 22 Aug 2002
Update of /cvsroot/siesta/siesta/lib/Siesta/Plugin
In directory usw-pr-cvs1:/tmp/cvs-serv8236

Modified Files:
	Send.pm 
Log Message:
only add one set of list headers


Index: Send.pm
===================================================================
RCS file: /cvsroot/siesta/siesta/lib/Siesta/Plugin/Send.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- Send.pm	22 Aug 2002 19:21:23 -0000	1.15
+++ Send.pm	22 Aug 2002 21:06:34 -0000	1.16
@@ -14,19 +14,21 @@
     my $mail = $args{mail};
     my $list = $args{list};
 
+    my $post = $list->post_address;
+    $mail->head->add('X-Been-There', $post);
+
     my $list_name = $list->id;
+    # observe RFC2919
+    $post =~ s/@/./;
+    $mail->head->add('List-Id', "$list_name list <$post>");
+
+    my $subject = $mail->head->get("Subject");
+    $mail->head->replace("Subject", "[$list_name] $subject")
+      unless /\[$list_name\]/;
+
     for my $user ($list->members) {
         my $address = $user->id;
         print "spamming $address up their stupid ass\n" if debug;
-
-        my $post = $list->post_address;
-        $mail->head->add('X-Been-There', $post);
-        # observe RFC2919
-        $post =~ s/@/./;
-        $mail->head->add('List-Id', "$list_name list <$post>");
-
-        my $subject = $mail->head->get("Subject");
-        $mail->head->replace("Subject", "[$list_name] $subject");
 
         local *SENDMAIL;
         open SENDMAIL, "|/usr/sbin/sendmail -oi -f ".$list->return_path." $address"



Generated at 13:57 on 01 Jul 2004 by mariachi 0.52