diff --git a/src/pilerimport.c b/src/pilerimport.c index 02fb943b..89fc2f95 100644 --- a/src/pilerimport.c +++ b/src/pilerimport.c @@ -441,10 +441,12 @@ ENDE: rc = import_from_imap_server(s_server, s_username, s_password, 143, sdata, data, skiplist, dryrun, cfg); } - if(rc == ERR){ + // don't set error in case of a problem, because it + // will scare users looking at the gui progressbar + /*if(rc == ERR){ data->import->status = 3; update_import_job_stat(sdata, data); - } + }*/ return rc; } diff --git a/webui/controller/import/test.php b/webui/controller/import/test.php index 75964fab..712ecf93 100644 --- a/webui/controller/import/test.php +++ b/webui/controller/import/test.php @@ -17,6 +17,7 @@ class ControllerImportTest extends Controller { $db = Registry::get('db'); $lang = Registry::get('language'); + if($this->request->post['type'] == 'pop3') { try { @@ -47,6 +48,26 @@ class ControllerImportTest extends Controller { } + else if($this->request->post['type'] == 'imap') { + + try { + + $conn = new Zend_Mail_Protocol_Imap($this->request->post['server'], '143', false); + + $login = $conn->login($this->request->post['username'], $this->request->post['password']); + + if($login) { + print "" . $lang->data['text_connection_ok'] . " "; + } else { + print "" . $this->request->post['username'] . ": " . $lang->data['text_login_failed'] . " "; + } + + } catch (Zend_Mail_Protocol_Exception $e) { + print "" . $this->request->post['server'] . ": " . $lang->data['text_connection_failed'] . " "; + } + + } + else { print "" . $lang->data['text_error'] . " "; } diff --git a/webui/view/theme/default/templates/import/list.tpl b/webui/view/theme/default/templates/import/list.tpl index c432f19e..d15d5c07 100644 --- a/webui/view/theme/default/templates/import/list.tpl +++ b/webui/view/theme/default/templates/import/list.tpl @@ -25,7 +25,15 @@ - +
+ +
+ +
+
"> diff --git a/webui/view/theme/mobile/templates/import/list.tpl b/webui/view/theme/mobile/templates/import/list.tpl index c432f19e..d15d5c07 100644 --- a/webui/view/theme/mobile/templates/import/list.tpl +++ b/webui/view/theme/mobile/templates/import/list.tpl @@ -25,7 +25,15 @@ - +
+ +
+ +
+
">