[siesta-commit] siesta/lib/Siesta/Send Sendmail.pm,1.5,1.6

[prev] [thread] [next] [lurker] [Date index for 2002/09/15]

From: clampr
Subject: [siesta-commit] siesta/lib/Siesta/Send Sendmail.pm,1.5,1.6
Date: 16:47 on 15 Sep 2002
Update of /cvsroot/siesta/siesta/lib/Siesta/Send
In directory usw-pr-cvs1:/tmp/cvs-serv19444/lib/Siesta/Send

Modified Files:
	Sendmail.pm 
Log Message:
fix the Send plugin so that it doesn't munge

Let the ->send api take an array of email addresses (makes handing off 
to Sendmail more efficient)


Index: Sendmail.pm
===================================================================
RCS file: /cvsroot/siesta/siesta/lib/Siesta/Send/Sendmail.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Sendmail.pm	15 Sep 2002 11:19:11 -0000	1.5
+++ Sendmail.pm	15 Sep 2002 15:47:23 -0000	1.6
@@ -1,5 +1,5 @@
+# $Id$
 package Siesta::Send::Sendmail;
-
 use strict;
 use Siesta::Send;
 use base 'Siesta::Send';
@@ -21,9 +21,10 @@
     my $list = $message->list();
     my $from = $args{'from'} || $message->from();
     my $to   = $args{'to'} || $message->to();
+    my @to   = ref $to eq 'ARRAY' ? @$to : $to;
 
     local *SENDMAIL;
-    open SENDMAIL, "|/usr/sbin/sendmail -oi -f $from $to"
+    open SENDMAIL, "|/usr/sbin/sendmail -oi -f $from ".join(' ', @to)
       or die "couldn't fork sendmail $!";
     $message->print( \*SENDMAIL );
     close SENDMAIL



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