X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FMailer.pm;h=7b011d4b0ddb1076454bf36bb949ee57b3a6df95;hb=0ecb31986f567eb0b1e9949978458baba04c0ef9;hp=aec34e67d45169c6f78d364d074a752ba43257c5;hpb=faef45c2e723c9fbc80d1d84b8481367204719b7;p=kivitendo-erp.git 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};