Lines 21-27
use strict;
Link Here
|
21 |
use warnings; |
21 |
use warnings; |
22 |
|
22 |
|
23 |
use CGI qw ( -utf8 ); |
23 |
use CGI qw ( -utf8 ); |
24 |
use Encode qw(encode); |
24 |
use Encode qw( encode ); |
25 |
use Carp; |
25 |
use Carp; |
26 |
|
26 |
|
27 |
use Mail::Sendmail; |
27 |
use Mail::Sendmail; |
Lines 119-125
if ($email) {
Link Here
|
119 |
|
119 |
|
120 |
# Analysing information and getting mail properties |
120 |
# Analysing information and getting mail properties |
121 |
if ( $template_res =~ /<SUBJECT>(.*)<END_SUBJECT>/s ) { |
121 |
if ( $template_res =~ /<SUBJECT>(.*)<END_SUBJECT>/s ) { |
122 |
$mail{subject} = $1; |
122 |
$mail{'subject'} = Encode::encode("UTF-8", $1); |
123 |
$mail{subject} =~ s|\n?(.*)\n?|$1|; |
123 |
$mail{subject} =~ s|\n?(.*)\n?|$1|; |
124 |
} |
124 |
} |
125 |
else { $mail{'subject'} = "no subject"; } |
125 |
else { $mail{'subject'} = "no subject"; } |
Lines 128-134
if ($email) {
Link Here
|
128 |
if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) { |
128 |
if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) { |
129 |
$email_header = $1; |
129 |
$email_header = $1; |
130 |
$email_header =~ s|\n?(.*)\n?|$1|; |
130 |
$email_header =~ s|\n?(.*)\n?|$1|; |
131 |
$email_header = encode_qp($email_header); |
131 |
$email_header = encode_qp(Encode::encode("UTF-8", $email_header)); |
132 |
} |
132 |
} |
133 |
|
133 |
|
134 |
my $email_file = "list.txt"; |
134 |
my $email_file = "list.txt"; |
Lines 140-146
if ($email) {
Link Here
|
140 |
if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) { |
140 |
if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) { |
141 |
$body = $1; |
141 |
$body = $1; |
142 |
$body =~ s|\n?(.*)\n?|$1|; |
142 |
$body =~ s|\n?(.*)\n?|$1|; |
143 |
$body = encode_qp($body); |
143 |
$body = encode_qp(Encode::encode("UTF-8", $body)); |
144 |
} |
144 |
} |
145 |
|
145 |
|
146 |
my $boundary = "====" . time() . "===="; |
146 |
my $boundary = "====" . time() . "===="; |
147 |
- |
|
|