X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FMailer.pm;h=5123babb936f692c5a43db5073148375c10ce9bb;hb=6216f7b53a81a73641a2d98ea43f363b6a615b07;hp=aec34e67d45169c6f78d364d074a752ba43257c5;hpb=faef45c2e723c9fbc80d1d84b8481367204719b7;p=kivitendo-erp.git diff --git a/SL/Mailer.pm b/SL/Mailer.pm index aec34e67d..5123babb9 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}; @@ -157,7 +152,7 @@ $self->{message} } else { $filename = $attachment; # strip path - $filename =~ s/(.*\/|$self->{fileid})//g; + $filename =~ s/(.*\/|\Q$self->{fileid}\E)//g; } my $application =