X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=opac%2Fopac-sendbasket.pl;h=ca3a9736381b1320592a83e801c81a1a9fa7cddd;hb=ed30c16dc2e26a63a9349060e80cd62b55017450;hp=5b38a54394122366af12d8dbf0c1339cfa3b784a;hpb=b2b16fb8cf4bf89862eba6fc14d507dc79de4db7;p=koha_fer diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl index 5b38a54394..ca3a973638 100755 --- a/opac/opac-sendbasket.pl +++ b/opac/opac-sendbasket.pl @@ -127,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\"";