From d1dad8a31c6c7fe30c20815183d38835bdfbcbd2 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Tue, 20 Oct 2015 16:06:36 +0000 Subject: [PATCH] merge patch from https://github.com/lisergey/postfixadmin/commit/54a77ecb9c7bc03afaab9989d73411c9d312a0c7 - thanks lisergey - encode message body with wide-chars UTF8 git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1820 a1433add-5e2c-0410-b055-b7f2511e0802 --- VIRTUAL_VACATION/vacation.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/VIRTUAL_VACATION/vacation.pl b/VIRTUAL_VACATION/vacation.pl index 9bc87585..b7f929a3 100644 --- a/VIRTUAL_VACATION/vacation.pl +++ b/VIRTUAL_VACATION/vacation.pl @@ -114,8 +114,10 @@ # http://dag.wieers.com/home-made/apt/packages.php # +use utf8; use DBI; -use MIME::Base64; +use MIME::Base64 qw(encode_base64); +use Encode qw(encode); use MIME::EncWords qw(:all); use Email::Valid; use strict; @@ -550,7 +552,7 @@ sub send_vacation_email { 'from' => $from, 'fake_from' => $friendly_from . " <$from>", 'to' => $to, - 'msg' => encode_base64($body) + 'msg' => encode_base64(encode("UTF-8", $body)) ); if($test_mode == 1) { $logger->info("** TEST MODE ** : Vacation response sent to $to from $from subject $subject (not) sent\n");