From: Mark Wells Date: Fri, 17 Apr 2015 04:54:35 +0000 (-0700) Subject: don't try to produce plain text quotations without a template, #34460, from #31786 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=2d7cf9d3a071bc96cb1b186cecec167c9e3482a5 don't try to produce plain text quotations without a template, #34460, from #31786 --- 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; + + } }