summaryrefslogtreecommitdiff
path: root/FS/FS/msg_template/email.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-09-18 10:18:43 -0700
committerMark Wells <mark@freeside.biz>2015-09-18 10:19:08 -0700
commit77a4ccff7384368888fe88379f01f9ddc34244d8 (patch)
treedf949604ac1bbd5bb17b647fa37b7c0fb42dee1d /FS/FS/msg_template/email.pm
parent8cbf995cfbc851821242f4ab5e03713b3de8ef69 (diff)
send commission reports by email, #33101
Diffstat (limited to 'FS/FS/msg_template/email.pm')
-rw-r--r--FS/FS/msg_template/email.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/FS/FS/msg_template/email.pm b/FS/FS/msg_template/email.pm
index e69183f..5f27370 100644
--- a/FS/FS/msg_template/email.pm
+++ b/FS/FS/msg_template/email.pm
@@ -200,6 +200,12 @@ A hash reference of additional substitutions
A string identifying the kind of message this is. Currently can be "invoice",
"receipt", "admin", or null. Expand this list as necessary.
+=item override_content
+
+A string to use as the HTML body; if specified, replaces the entire
+body of the message. This should be used ONLY by L<FS::report_batch> and may
+go away in the future.
+
=back
=cut
@@ -265,6 +271,12 @@ sub prepare {
warn "$me filling in body template\n" if $DEBUG;
$body = $body_tmpl->fill_in( HASH => $hashref );
+ # override $body if requested
+ if ( $opt{'override_content'} ) {
+ warn "$me overriding template body with requested content" if $DEBUG;
+ $body = $opt{'override_content'};
+ }
+
###
# and email
###