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 117-123
if ( $email ) {
Link Here
|
117 |
|
117 |
|
118 |
# Analysing information and getting mail properties |
118 |
# Analysing information and getting mail properties |
119 |
if ( $template_res =~ /<SUBJECT>(.*)<END_SUBJECT>/s ) { |
119 |
if ( $template_res =~ /<SUBJECT>(.*)<END_SUBJECT>/s ) { |
120 |
$mail{subject} = $1; |
120 |
$mail{'subject'} = Encode::encode("UTF-8", $1); |
121 |
$mail{subject} =~ s|\n?(.*)\n?|$1|; |
121 |
$mail{subject} =~ s|\n?(.*)\n?|$1|; |
122 |
} |
122 |
} |
123 |
else { $mail{'subject'} = "no subject"; } |
123 |
else { $mail{'subject'} = "no subject"; } |
Lines 126-132
if ( $email ) {
Link Here
|
126 |
if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) { |
126 |
if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) { |
127 |
$email_header = $1; |
127 |
$email_header = $1; |
128 |
$email_header =~ s|\n?(.*)\n?|$1|; |
128 |
$email_header =~ s|\n?(.*)\n?|$1|; |
129 |
$email_header = encode_qp($email_header); |
129 |
$email_header = encode_qp(Encode::encode("UTF-8", $email_header)); |
130 |
} |
130 |
} |
131 |
|
131 |
|
132 |
my $email_file = "list.txt"; |
132 |
my $email_file = "list.txt"; |
Lines 138-144
if ( $email ) {
Link Here
|
138 |
if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) { |
138 |
if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) { |
139 |
$body = $1; |
139 |
$body = $1; |
140 |
$body =~ s|\n?(.*)\n?|$1|; |
140 |
$body =~ s|\n?(.*)\n?|$1|; |
141 |
$body = encode_qp($body); |
141 |
$body = encode_qp(Encode::encode("UTF-8", $body)); |
142 |
} |
142 |
} |
143 |
|
143 |
|
144 |
my $boundary = "====" . time() . "===="; |
144 |
my $boundary = "====" . time() . "===="; |
145 |
- |
|
|