mail.pm: encode UTF-8 header

This commit is contained in:
Milan
2023-05-20 07:58:07 +02:00
parent 3effdd6ef0
commit 611fad43d4

View File

@@ -3,9 +3,11 @@ package mail;
use strict;
use warnings;
no warnings 'redefine';
use utf8;
use Email::Sender::Simple();
use Email::Simple();
use MIME::Words qw(encode_mimeword);
sub send($) {
my ($mail) = @_;
@@ -17,7 +19,7 @@ sub send($) {
'To' => $mail->{'To'},
'Cc' => $mail->{'Cc'},
'Reply-To' => $mail->{'Reply-To'},
'Subject' => $mail->{'Subject'}
'Subject' => encode_mimeword($mail->{'Subject'}, 'b', 'UTF-8')
],
body => $mail->{'Data'},
);