From 34985df260c95fe165d2e7a762fd2bb13709acf4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Thu, 24 Sep 2015 17:02:40 +0200 Subject: [PATCH] =?utf8?q?Auftrags-Controller:=20Attachment=20direkt=20an?= =?utf8?q?=20den=20Mailer=20=C3=BCbergeben.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Inzwischen ist kein Umweg über eine Datei mehr notwendig. --- SL/Controller/Order.pm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index 1c64e40d0..e6ab2ae7f 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -186,12 +186,8 @@ sub action_send_email { return $self->js->flash('error', t8('Conversion to PDF failed: #1', $errors[0]))->render($self); } - my $sfile = SL::SessionFile::Random->new(mode => "w"); - $sfile->fh->print($pdf); - $sfile->fh->close; - - $mail->{attachments} = [{ "filename" => $sfile->file_name, - "name" => $::form->{email}->{attachment_filename} }]; + $mail->{attachments} = [{ "content" => $pdf, + "name" => $::form->{email}->{attachment_filename} }]; if (my $err = $mail->send) { return $self->js->flash('error', t8('Sending E-mail: ') . $err) -- 2.20.1