[Koha-cvs] CVS: koha/opac opac-sendbasket.pl,1.4.2.4,1.4.2.5
Paul POULAIN
tipaul at users.sourceforge.net
Tue Oct 4 17:27:01 CEST 2005
Update of /cvsroot/koha/koha/opac
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14591/opac
Modified Files:
Tag: rel_2_2
opac-sendbasket.pl
Log Message:
fixing a bug in basket sending (there was only the iso2709 file)
Index: opac-sendbasket.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-sendbasket.pl,v
retrieving revision 1.4.2.4
retrieving revision 1.4.2.5
diff -C2 -r1.4.2.4 -r1.4.2.5
*** opac-sendbasket.pl 6 Jun 2005 15:47:27 -0000 1.4.2.4
--- opac-sendbasket.pl 4 Oct 2005 15:26:59 -0000 1.4.2.5
***************
*** 76,79 ****
--- 76,80 ----
# Getting template result
my $template_res = $template2->output();
+ my $body;
# Analysing information and getting mail properties
***************
*** 87,165 ****
if ($template_res =~ /<FILENAME>\n(.*)\n<END_FILENAME>/s) { $email_file = $1; }
! if ($template_res =~ /<MESSAGE>\n(.*)\n<END_MESSAGE>/s) { $mail{'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} = <<END_OF_BODY;
$boundary
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
! $message
$boundary
! Content-Type: application/octet-stream; name="basket"
Content-Transfer-Encoding: base64
! Content-Disposition: attachment; filename="basket"
!
! $mail{body}
! $boundary--
! END_OF_BODY
!
!
!
! <<END_OF_BODY;
! $boundary
! Content-Type: text/plain; charset="iso-8859-1"
! Content-Transfer-Encoding: quoted-printable
!
! $email_header
!
! $mail{'body'}
$boundary--
END_OF_BODY
- $mail{attachment} = $iso2709;
- # $mail{body} = <<END_OF_BODY;
- #$boundary
- #Content-Type: text/plain; charset="iso-8859-1"
- #Content-Transfer-Encoding: quoted-printable
- #
- #$email_header
- #
- #$boundary
- #Content-Type: text/plain; name="$email_file"
- #Content-Transfer-Encoding: quoted-printable
- #Content-Disposition: attachment; filename="$email_file"
- #
- #$mail{'body'}
- #
- #$boundary--
- #END_OF_BODY
-
# Sending mail
if (sendmail %mail) {
# do something if it works....
- # warn " ".$mail{body};
- # warn " ".$mail{PJ};
$template->param(SENT => "1");
$template->param(email_add => $email_add);
--- 88,116 ----
if ($template_res =~ /<FILENAME>\n(.*)\n<END_FILENAME>/s) { $email_file = $1; }
! if ($template_res =~ /<MESSAGE>\n(.*)\n<END_MESSAGE>/s) { $body = $1; }
my $boundary = "====" . time() . "====";
$mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\"";
! my $isofile = encode_base64($iso2709);
! $boundary = '--'.$boundary;
! $mail{body} =
! <<END_OF_BODY;
$boundary
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
! $body
$boundary
! Content-Type: application/octet-stream; name="basket.iso2709"
Content-Transfer-Encoding: base64
! Content-Disposition: attachment; filename="basket.iso2709"
+ $isofile
$boundary--
END_OF_BODY
# Sending mail
if (sendmail %mail) {
# do something if it works....
$template->param(SENT => "1");
$template->param(email_add => $email_add);
***************
*** 168,172 ****
warn "Error sending mail: $Mail::Sendmail::error \n";
}
-
output_html_with_http_headers $query, $cookie, $template->output;
}
--- 119,122 ----
More information about the Koha-cvs
mailing list