From d0295833c7e240698bfd7b3a9bddf2024a602253 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Thu, 16 Apr 2015 21:54:54 -0700 Subject: [PATCH] don't try to produce plain text quotations without a template, #34460, from #31786 --- FS/FS/Template_Mixin.pm | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm index c5a416b51..9e43c3c5c 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -2093,11 +2093,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; + + } } -- 2.11.0