X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/faef45c2e723c9fbc80d1d84b8481367204719b7..ab96e204a2beec2302b1850df50f45a6e67a13c4:/SL/Mailer.pm diff --git a/SL/Mailer.pm b/SL/Mailer.pm index aec34e67d..7b011d4b0 100644 --- a/SL/Mailer.pm +++ b/SL/Mailer.pm @@ -89,7 +89,9 @@ sub mime_quote_text { sub send { $main::lxdebug->enter_sub(); - my ($self, $out) = @_; + my ($self) = @_; + + local (*IN, *OUT); my $boundary = time; $boundary = "LxOffice-$self->{version}-$boundary"; @@ -99,16 +101,9 @@ sub send { $self->{charset} = Common::DEFAULT_CHARSET unless $self->{charset}; - if ($out) { - if (!open(OUT, $out)) { - $main::lxdebug->leave_sub(); - return "$out : $!"; - } - } else { - if (!open(OUT, ">-")) { - $main::lxdebug->leave_sub(); - return "STDOUT : $!"; - } + if (!open(OUT, $main::sendmail)) { + $main::lxdebug->leave_sub(); + return "$main::sendmail : $!"; } $self->{contenttype} = "text/plain" unless $self->{contenttype};