Example #1
0
File: modules.php Project: R-J/hm3
 /**
  * Used on the servers page to test a POP3 connection
  */
 public function process()
 {
     $pop3 = false;
     if (isset($this->request->post['pop3_connect'])) {
         list($success, $form) = $this->process_form(array('pop3_user', 'pop3_pass', 'pop3_server_id'));
         if ($success) {
             $pop3 = Hm_POP3_List::connect($form['pop3_server_id'], false, $form['pop3_user'], $form['pop3_pass']);
         } elseif (isset($form['pop3_server_id'])) {
             $pop3 = Hm_POP3_List::connect($form['pop3_server_id'], false);
         }
         if ($pop3 && $pop3->state == 'authed') {
             Hm_Msgs::add("Successfully authenticated to the POP3 server");
         } else {
             Hm_Msgs::add("ERRFailed to authenticate to the POP3 server");
         }
     }
 }