X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=opac%2Fopac-sendbasket.pl;h=ca3a9736381b1320592a83e801c81a1a9fa7cddd;hb=42c829837cef09fa5449ec415ec2926784830ddb;hp=a3a4eb8799e9cd38d87042645c494989f4f7c36b;hpb=60b6c187c46614431f109512c740a3bcf077f342;p=koha_fer diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl index a3a4eb8799..ca3a973638 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,33 @@ 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|; } 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("UTF-8", encode_qp($body)); } + $mail{body} = $body; + my $boundary = "====" . time() . "===="; $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\"";