[freeside-commits] freeside/FS/FS Misc.pm, 1.42, 1.42.2.1 msg_template.pm, 1.14.2.1, 1.14.2.2

Mark Wells mark at wavetail.420.am
Tue Dec 28 16:02:31 PST 2010


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv10162/FS/FS

Modified Files:
      Tag: FREESIDE_2_1_BRANCH
	Misc.pm msg_template.pm 
Log Message:
send_email export, RT#10884

Index: msg_template.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/msg_template.pm,v
retrieving revision 1.14.2.1
retrieving revision 1.14.2.2
diff -u -w -d -r1.14.2.1 -r1.14.2.2
--- msg_template.pm	8 Nov 2010 21:46:13 -0000	1.14.2.1
+++ msg_template.pm	29 Dec 2010 00:02:28 -0000	1.14.2.2
@@ -178,7 +178,7 @@
 =item to
 
 Destination address.  The default is to use the customer's 
-invoicing_list addresses.
+invoicing_list addresses.  Multiple addresses may be comma-separated.
 
 =back
 
@@ -281,11 +281,14 @@
   # and email
   ###
 
-  my @to = ($opt{'to'}) || $cust_main->invoicing_list_emailonly;
-  #warn "prepared msg_template with no email destination (custnum ".
-  #  $cust_main->custnum.")\n"
-  #  if !@to;
-  #  warning is not appropriate now that we use these for tickets
+  my @to;
+  if ( exists($opt{'to'}) ) {
+    @to = split(/\s*,\s*/, $opt{'to'});
+  }
+  else {
+    @to = $cust_main->invoicing_list_emailonly;
+  }
+  # no warning when preparing with no destination
 
   my $conf = new FS::Conf;
 

Index: Misc.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Misc.pm,v
retrieving revision 1.42
retrieving revision 1.42.2.1
diff -u -w -d -r1.42 -r1.42.2.1
--- Misc.pm	14 Oct 2010 01:14:27 -0000	1.42
+++ Misc.pm	29 Dec 2010 00:02:28 -0000	1.42.2.1
@@ -323,9 +323,9 @@
 
   my $data;
   if ( ref($args{'text_body'}) eq 'ARRAY' ) {
-    $data = $args{'text_body'};
+    $data = join("\n", @{ $args{'text_body'} });
   } else {
-    $data = [ split(/\n/, $args{'text_body'}) ];
+    $data = $args{'text_body'};
   }
 
   $alternative->attach(



More information about the freeside-commits mailing list