mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 22:41:59 +01:00
improved imap restore
This commit is contained in:
parent
34db7522d2
commit
5afb3f4f72
@ -101,6 +101,7 @@ $config['ENABLE_SSO_LOGIN'] = 0;
|
||||
// enable authentication against an imap server (disabled by default)
|
||||
|
||||
$config['ENABLE_IMAP_AUTH'] = 0;
|
||||
$config['RESTORE_OVER_IMAP'] = 0;
|
||||
$config['IMAP_HOST'] = 'mail.yourdomain.com';
|
||||
$config['IMAP_PORT'] = 993;
|
||||
$config['IMAP_SSL'] = true;
|
||||
|
@ -46,7 +46,7 @@ class ControllerMessageBulkrestore extends Controller {
|
||||
|
||||
$this->data['restored'] = 0;
|
||||
|
||||
if(ENABLE_IMAP_AUTH == 1) {
|
||||
if(RESTORE_OVER_IMAP == 1) {
|
||||
require_once 'Zend/Mail/Protocol/Imap.php';
|
||||
require_once 'Zend/Mail/Storage/Imap.php';
|
||||
|
||||
@ -82,7 +82,7 @@ class ControllerMessageBulkrestore extends Controller {
|
||||
$msg = $this->model_search_message->get_raw_message($piler_id);
|
||||
$this->model_search_message->remove_journal($msg);
|
||||
|
||||
if(ENABLE_IMAP_AUTH == 1) {
|
||||
if(RESTORE_OVER_IMAP == 1) {
|
||||
if($imap_ok) {
|
||||
$x = $this->imap->append('INBOX', $msg);
|
||||
}
|
||||
@ -107,7 +107,7 @@ class ControllerMessageBulkrestore extends Controller {
|
||||
|
||||
$this->model_search_message->disconnect_from_pilergetd();
|
||||
|
||||
if(ENABLE_IMAP_AUTH == 1) { $this->model_mail_mail->disconnect_imap(); }
|
||||
if(RESTORE_OVER_IMAP == 1) { $this->model_mail_mail->disconnect_imap(); }
|
||||
|
||||
|
||||
$this->render();
|
||||
|
@ -25,7 +25,7 @@ class ControllerMessageRestore extends Controller {
|
||||
|
||||
$rcpt = array();
|
||||
|
||||
if(ENABLE_IMAP_AUTH == 1) {
|
||||
if(RESTORE_OVER_IMAP == 1) {
|
||||
require_once 'Zend/Mail/Protocol/Imap.php';
|
||||
require_once 'Zend/Mail/Storage/Imap.php';
|
||||
}
|
||||
@ -71,7 +71,7 @@ class ControllerMessageRestore extends Controller {
|
||||
|
||||
$this->model_search_message->remove_journal($msg);
|
||||
|
||||
if(ENABLE_IMAP_AUTH == 1) {
|
||||
if(RESTORE_OVER_IMAP == 1) {
|
||||
if($this->model_mail_mail->connect_imap()) {
|
||||
$x = $this->imap->append('INBOX', $msg);
|
||||
$this->model_mail_mail->disconnect_imap();
|
||||
|
Loading…
Reference in New Issue
Block a user