diff options
author | Florian Pritz <bluewind@xinu.at> | 2018-07-19 17:25:00 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2018-07-19 17:25:00 +0200 |
commit | 13cad1519b679526b2b8f5f38dd388d0ed3a4dcd (patch) | |
tree | 755a323754e9d0d630f0fa595bf9a9c3f8e1dcd6 /lib | |
parent | f4acd5a69e71fce176e6bb0cb57bd3d8b5717af8 (diff) | |
download | App-ImapNotify-13cad1519b679526b2b8f5f38dd388d0ed3a4dcd.tar.gz App-ImapNotify-13cad1519b679526b2b8f5f38dd388d0ed3a4dcd.tar.xz |
Decode MIME-Header encoded headers
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/App/ImapNotify.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/App/ImapNotify.pm b/lib/App/ImapNotify.pm index b7b1cf7..cd81538 100644 --- a/lib/App/ImapNotify.pm +++ b/lib/App/ImapNotify.pm @@ -9,6 +9,7 @@ use App::ImapNotify::ImapClient; use App::ImapNotify::Notifier; use Carp; +use Encode qw(encode decode); use Function::Parameters; use Log::Any qw($log); use Syntax::Keyword::Try; @@ -138,7 +139,7 @@ method _notify($message) { for my $line ($message->@*) { if ($line =~ m/^(?<label>[^\s:]+): (?<value>.*)\r\n$/) { $current_field = lc($+{label}); - $fields->{$current_field} = $+{value}; + $fields->{$current_field} = decode('MIME-Header', $+{value}); next; } |