From 6ea6dc709b25261ac87605e4b21ace4aa23d79f4 Mon Sep 17 00:00:00 2001 From: tipaul Date: Tue, 4 Oct 2005 15:26:59 +0000 Subject: [PATCH] fixing a bug in basket sending (there was only the iso2709 file) --- opac/opac-sendbasket.pl | 70 ++++++----------------------------------- 1 file changed, 10 insertions(+), 60 deletions(-) diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl index d56d6c4e72..81967d3563 100755 --- a/opac/opac-sendbasket.pl +++ b/opac/opac-sendbasket.pl @@ -75,6 +75,7 @@ if ($email_add) { # Getting template result my $template_res = $template2->output(); + my $body; # Analysing information and getting mail properties if ($template_res =~ /\n(.*)\n/s) { $mail{'subject'} = $1; } @@ -86,88 +87,37 @@ if ($email_add) { my $email_file = "basket.txt"; if ($template_res =~ /\n(.*)\n/s) { $email_file = $1; } - if ($template_res =~ /\n(.*)\n/s) { $mail{'body'} = $1; } + if ($template_res =~ /\n(.*)\n/s) { $body = $1; } my $boundary = "====" . time() . "===="; -# $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\""; -# -# $email_header = encode_qp($email_header); -# -# $boundary = "--".$boundary; -# -# # Writing mail -# $mail{body} = $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\""; - - my $message = encode_qp( "" ); - -# $file = $^X; # This is the perl executable -# -# open (F, $file) or die "Cannot read $file: $!"; -# binmode F; undef $/; -$mail{body} = encode_base64($iso2709); -# close F; - -$boundary = '--'.$boundary; -$mail{body} = <param(SENT => "1"); $template->param(email_add => $email_add); } else { # do something if it doesnt work.... warn "Error sending mail: $Mail::Sendmail::error \n"; } - output_html_with_http_headers $query, $cookie, $template->output; } else { -- 2.39.5