X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/ebacee0a54bad3082004f93d64bf450a835db72c..974b5d8664caba8cebfccc55b1be53a09916a200:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index f29c67166..5a5005eff 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -731,7 +731,9 @@ sub parse_template { $main::lxdebug->enter_sub(); my ($self, $myconfig, $userspath) = @_; - my $template; + my ($template, $out); + + local (*IN, *OUT); $self->{"cwd"} = getcwd(); $self->{"tmpdir"} = $self->{cwd} . "/${userspath}"; @@ -775,6 +777,7 @@ sub parse_template { # for postscript we store a copy in a temporary file my $fileid = time; $self->{tmpfile} ||= "$userspath/${fileid}.$self->{IN}"; + if ($template->uses_temp_file() || $self->{media} eq 'email') { $out = $self->{OUT}; $self->{OUT} = ">$self->{tmpfile}"; @@ -841,7 +844,7 @@ sub parse_template { } - my $err = $mail->send($out); + my $err = $mail->send(); $self->error($self->cleanup . "$err") if ($err); } else {