summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-04-16 21:54:35 -0700
committerMark Wells <mark@freeside.biz>2015-04-16 21:54:35 -0700
commit2d7cf9d3a071bc96cb1b186cecec167c9e3482a5 (patch)
tree748d2045319ee0a61c62ee392fc37565b94b6aa4 /FS
parentc9666df6c2717f98a5088b39f1babc55c4d8e771 (diff)
don't try to produce plain text quotations without a template, #34460, from #31786
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/Template_Mixin.pm17
1 files changed, 13 insertions, 4 deletions
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index 563cbdd8f..44d44e185 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -2094,11 +2094,20 @@ sub generate_email {
if (!@text) {
- warn "$me generating plain text invoice"
- if $DEBUG;
+ if ( $conf->config($tc.'template') ) {
+
+ warn "$me generating plain text invoice"
+ if $DEBUG;
- # 'print_text' argument is no longer used
- @text = $self->print_text(\%args);
+ # 'print_text' argument is no longer used
+ @text = $self->print_text(\%args);
+
+ } else {
+
+ warn "$me no plain text version exists; sending empty message body"
+ if $DEBUG;
+
+ }
}