From 0a0e044ba7d9f59b4ca95c365cdc21350d896bd4 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sun, 10 Sep 2023 15:59:58 -0700 Subject: [PATCH] Fix detection of sent folder in IMAP mode --- mailbox/mailbox-lib.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mailbox/mailbox-lib.pl b/mailbox/mailbox-lib.pl index d6c3ba85..b03a90db 100755 --- a/mailbox/mailbox-lib.pl +++ b/mailbox/mailbox-lib.pl @@ -335,10 +335,12 @@ sub list_folders my $sf; my $sent; if ($userconfig{'sent_name'}) { + $sf = $userconfig{'sent_name'}; ($sent) = grep { lc($_->{'name'}) eq lc($sf) } @rv; } else { - ($sent) = grep { lc($_->{'name'}) eq 'sent' } @rv; + $sf = "sent"; + ($sent) = grep { lc($_->{'name'}) eq $sf } @rv; if (!$sent) { ($sent) = grep { $_->{'name'} =~ /sent/i } @rv; }