X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=opac%2Fopac-sendbasket.pl;h=5821bea9fee6f1c1d71f54e205ae16b3520f63b0;hb=c53520d58d9073ab6ad2fbf74a1d1cccf7d8918d;hp=a3a4eb8799e9cd38d87042645c494989f4f7c36b;hpb=108e901043f0766f8c103f3826b5af1cdb6daaa4;p=koha_fer diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl index a3a4eb8799..5821bea9fe 100755 --- a/opac/opac-sendbasket.pl +++ b/opac/opac-sendbasket.pl @@ -27,7 +27,6 @@ use Carp; use Mail::Sendmail; use MIME::QuotedPrint; use MIME::Base64; -use HTML::FormatText; use C4::Biblio; use C4::Items; use C4::Auth; @@ -128,25 +127,34 @@ if ( $email_add ) { my $body; # Analysing information and getting mail properties - if ( $template_res =~ /\n(.*)\n?/s ) { - $mail{'subject'} = $1; + + if ( $template_res =~ /(.*)/s ) { + $mail{subject} = $1; + $mail{subject} =~ s|\n?(.*)\n?|$1|; } else { $mail{'subject'} = "no subject"; } my $email_header = ""; - if ( $template_res =~ /
\n(.*)\n?/s ) { + if ( $template_res =~ /
(.*)/s ) { $email_header = $1; + $email_header =~ s|\n?(.*)\n?|$1|; + $email_header = encode_qp($email_header); } my $email_file = "basket.txt"; - if ( $template_res =~ /\n(.*)\n?/s ) { + if ( $template_res =~ /(.*)/s ) { $email_file = $1; + $email_file =~ s|\n?(.*)\n?|$1|; } - if ( $template_res =~ /\n(.*)\n?/s ) { + if ( $template_res =~ /(.*)/s ) { $body = $1; + $body =~ s|\n?(.*)\n?|$1|; + $body = encode_qp($body); } + $mail{body} = $body; + my $boundary = "====" . time() . "===="; $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\"";