summaryrefslogtreecommitdiff
path: root/FS/FS/msg_template.pm
diff options
context:
space:
mode:
authormark <mark>2010-12-29 00:02:18 +0000
committermark <mark>2010-12-29 00:02:18 +0000
commitb0da0c6242a4147fbfa6d9268390c617e88da513 (patch)
tree414d7ee6767cd0e5789ebf4c6f965eae2089fcf5 /FS/FS/msg_template.pm
parentd1da7fd0b1f1f15abf3552652e2607d39c934663 (diff)
send_email export, RT#10884
Diffstat (limited to 'FS/FS/msg_template.pm')
-rw-r--r--FS/FS/msg_template.pm15
1 files changed, 9 insertions, 6 deletions
diff --git a/FS/FS/msg_template.pm b/FS/FS/msg_template.pm
index f0cda41..a35b2d1 100644
--- a/FS/FS/msg_template.pm
+++ b/FS/FS/msg_template.pm
@@ -178,7 +178,7 @@ rt_ticket export when exporting "replace" events.
=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 @@ sub prepare {
# 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;