From 5d7005320fcb90623306918fb96e05c5454b9944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Lukas?= Date: Wed, 27 Dec 2023 13:31:22 +0100 Subject: [PATCH] Fix #27226 --- htdocs/emailcollector/class/emailcollector.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index f808caf4e1d..df0ba69242a 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -1128,6 +1128,8 @@ class EmailCollector extends CommonObject $this->fetchFilters(); $this->fetchActions(); + $targetdir = ($this->target_directory ? $this->target_directory : ''); // Can be '[Gmail]/Trash' or 'mytag' + if (!empty($conf->global->MAIN_IMAP_USE_PHPIMAP)) { if ($this->acces_type == 1) { // Mode OAUth2 with PHP-IMAP @@ -1233,7 +1235,6 @@ class EmailCollector extends CommonObject return -2; } $sourcedir = $this->source_directory; - $targetdir = ($this->target_directory ? $this->target_directory : ''); // Can be '[Gmail]/Trash' or 'mytag' $connectstringserver = $this->getConnectStringIMAP(); $connectstringsource = $connectstringserver.imap_utf7_encode($sourcedir);