View | Details | Raw Unified | Return to bug 10605
Collapse All | Expand All

(-)a/opac/opac-sendbasket.pl (-8 / +15 lines)
Lines 127-151 if ( $email_add ) { Link Here
127
    my $body;
127
    my $body;
128
128
129
    # Analysing information and getting mail properties
129
    # Analysing information and getting mail properties
130
    if ( $template_res =~ /<SUBJECT>\n(.*)\n?<END_SUBJECT>/s ) {
130
131
        $mail{'subject'} = $1;
131
    if ( $template_res =~ /<SUBJECT>(.*)<END_SUBJECT>/s ) {
132
        $mail{subject} = $1;
133
        $mail{subject} =~ s|\n?(.*)\n?|$1|;
132
    }
134
    }
133
    else { $mail{'subject'} = "no subject"; }
135
    else { $mail{'subject'} = "no subject"; }
134
136
135
    my $email_header = "";
137
    my $email_header = "";
136
    if ( $template_res =~ /<HEADER>\n(.*)\n?<END_HEADER>/s ) {
138
    if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) {
137
        $email_header = encode_qp($1);
139
        $email_header = $1;
140
        $email_header =~ s|\n?(.*)\n?|$1|;
138
    }
141
    }
139
142
140
    my $email_file = "basket.txt";
143
    my $email_file = "basket.txt";
141
    if ( $template_res =~ /<FILENAME>\n(.*)\n?<END_FILENAME>/s ) {
144
    if ( $template_res =~ /<FILENAME>(.*)<END_FILENAME>/s ) {
142
        $email_file = $1;
145
        $email_file = $1;
146
        $email_file =~ s|\n?(.*)\n?|$1|;
143
    }
147
    }
144
148
145
    if ( $template_res =~ /<MESSAGE>\n(.*)\n?<END_MESSAGE>/s ) {
149
    if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) {
146
        $body = encode_qp($1);
150
        $body = $1;
151
        $body =~ s|\n?(.*)\n?|$1|;
152
        $body = encode("UTF-8", encode_qp($body));
147
    }
153
    }
148
154
155
    $mail{body} = $body;
156
149
    my $boundary = "====" . time() . "====";
157
    my $boundary = "====" . time() . "====";
150
158
151
    $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\"";
159
    $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\"";
152
- 

Return to bug 10605