From 5bbd6f18de62b2698dfa5b2612795f9235a37837 Mon Sep 17 00:00:00 2001 From: SJ Date: Wed, 18 Mar 2015 10:54:02 +0100 Subject: [PATCH] added an option to specify the imap restore folder --- webui/config.php | 1 + webui/controller/message/bulkrestore.php | 2 +- webui/controller/message/restore.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/webui/config.php b/webui/config.php index 27ea607d..aef4ebda 100644 --- a/webui/config.php +++ b/webui/config.php @@ -108,6 +108,7 @@ $config['STRIP_DOMAIN_NAME_FROM_USERNAME'] = 0; $config['ENABLE_IMAP_AUTH'] = 0; $config['RESTORE_OVER_IMAP'] = 0; +$config['IMAP_RESTORE_FOLDER'] = 'INBOX'; $config['IMAP_HOST'] = 'mail.yourdomain.com'; $config['IMAP_PORT'] = 993; $config['IMAP_SSL'] = true; diff --git a/webui/controller/message/bulkrestore.php b/webui/controller/message/bulkrestore.php index 5db96383..8f6c31f4 100644 --- a/webui/controller/message/bulkrestore.php +++ b/webui/controller/message/bulkrestore.php @@ -88,7 +88,7 @@ class ControllerMessageBulkrestore extends Controller { if(RESTORE_OVER_IMAP == 1) { if($imap_ok) { - $x = $this->imap->append('INBOX', $msg); + $x = $this->imap->append(IMAP_RESTORE_FOLDER, $msg); } else { $x = 0; } } diff --git a/webui/controller/message/restore.php b/webui/controller/message/restore.php index d987c8a0..4d1e985d 100644 --- a/webui/controller/message/restore.php +++ b/webui/controller/message/restore.php @@ -74,7 +74,7 @@ class ControllerMessageRestore extends Controller { if(RESTORE_OVER_IMAP == 1) { if($this->model_mail_mail->connect_imap()) { - $x = $this->imap->append('INBOX', $msg); + $x = $this->imap->append(IMAP_RESTORE_FOLDER, $msg); $this->model_mail_mail->disconnect_imap(); } else {