vacation.pl: mime-decode original subject

Reported by czbg, https://sourceforge.net/p/postfixadmin/bugs/366/

Note that the original subject will keep the encoding specified in the
mime header (for example iso-8859-15) while we assume it to be utf8
(see "%mail =...").

Nevertheless, a broken character still looks better than having
=?ISO-8858-1?Q?Gr=DFe?= in the subject ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1857 a1433add-5e2c-0410-b055-b7f2511e0802
pull/19/head
Christian Boltz 8 years ago
parent 483bb83edc
commit 054d0a4c0e

@ -117,7 +117,7 @@
use utf8;
use DBI;
use MIME::Base64 qw(encode_base64);
use Encode qw(encode);
use Encode qw(encode decode);
use MIME::EncWords qw(:all);
use Email::Valid;
use strict;
@ -522,6 +522,7 @@ sub send_vacation_email {
$logger->debug("Will send vacation response for $orig_messageid: FROM: $email (orig_to: $orig_to), TO: $orig_from; VACATION SUBJECT: $row[0] ; VACATION BODY: $row[1]");
my $subject = $row[0];
$orig_subject = decode("mime-header", $orig_subject);
$subject =~ s/\$SUBJECT/$orig_subject/g;
if ($subject ne $row[0]) {
$logger->debug("Patched Subject of vacation message to: $subject");

Loading…
Cancel
Save