mail.pm: encode UTF-8 header
This commit is contained in:
@@ -3,9 +3,11 @@ package mail;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
no warnings 'redefine';
|
no warnings 'redefine';
|
||||||
|
use utf8;
|
||||||
|
|
||||||
use Email::Sender::Simple();
|
use Email::Sender::Simple();
|
||||||
use Email::Simple();
|
use Email::Simple();
|
||||||
|
use MIME::Words qw(encode_mimeword);
|
||||||
|
|
||||||
sub send($) {
|
sub send($) {
|
||||||
my ($mail) = @_;
|
my ($mail) = @_;
|
||||||
@@ -17,7 +19,7 @@ sub send($) {
|
|||||||
'To' => $mail->{'To'},
|
'To' => $mail->{'To'},
|
||||||
'Cc' => $mail->{'Cc'},
|
'Cc' => $mail->{'Cc'},
|
||||||
'Reply-To' => $mail->{'Reply-To'},
|
'Reply-To' => $mail->{'Reply-To'},
|
||||||
'Subject' => $mail->{'Subject'}
|
'Subject' => encode_mimeword($mail->{'Subject'}, 'b', 'UTF-8')
|
||||||
],
|
],
|
||||||
body => $mail->{'Data'},
|
body => $mail->{'Data'},
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user