mail.pm: encode body

UTF8 bodies must be encoded
This commit is contained in:
Milan
2023-10-23 21:39:47 +02:00
parent 9bd5e6df60
commit e06e4cbd41

View File

@@ -8,6 +8,7 @@ use utf8;
use Email::Sender::Simple();
use Email::Simple();
use MIME::Words qw(encode_mimeword);
use Encode;
sub send($) {
my ($mail) = @_;
@@ -21,7 +22,7 @@ sub send($) {
'Reply-To' => $mail->{'Reply-To'},
'Subject' => encode_mimeword($mail->{'Subject'}, 'b', 'UTF-8')
],
body => $mail->{'Data'},
body => Encode::encode( utf8 => $mail->{'Data'} ),
);
Email::Sender::Simple->send($email);
}