[freeside-commits] freeside/FS/FS Misc.pm, 1.42, 1.43 msg_template.pm, 1.15, 1.16
Mark Wells
mark at wavetail.420.am
Tue Dec 28 16:02:20 PST 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv10112/FS/FS
Modified Files:
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.15
retrieving revision 1.16
diff -u -w -d -r1.15 -r1.16
--- msg_template.pm 8 Nov 2010 20:59:54 -0000 1.15
+++ msg_template.pm 29 Dec 2010 00:02:18 -0000 1.16
@@ -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.43
diff -u -w -d -r1.42 -r1.43
--- Misc.pm 14 Oct 2010 01:14:27 -0000 1.42
+++ Misc.pm 29 Dec 2010 00:02:17 -0000 1.43
@@ -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