summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/App/ImapNotify.pm3
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;
}