$pop3->login($user, $pass); if (!$pop3) { $pop3->disconnect(); return false; } else { $pop3->disconnect(); return true; } } // Add a new mail account for the user here if (!isset($_REQUEST['accountId'])) $_REQUEST['accountId'] = 0; $smarty->assign('accountId', $_REQUEST['accountId']); if (isset($_REQUEST['new_acc'])) { check_ticket('admin-mailin'); if (!account_ok($_REQUEST['pop'], $_REQUEST['username'], $_REQUEST['pass'])) $tikifeedback[] = array( 'num' => 1, 'mes' => sprintf(tra('Mail-in account %s incorrect'), $_REQUEST['account']) ); else { $mailinlib->replace_mailin_account( $_REQUEST['accountId'], $_REQUEST['account'], $_REQUEST['pop'], $_REQUEST['port'], $_REQUEST['username'], $_REQUEST['pass'], $_REQUEST['smtp'], $_REQUEST['useAuth'], $_REQUEST['smtpPort'], $_REQUEST['type'],
if (!$pop3) { $pop3->disconnect(); return false; } else { $pop3->disconnect(); return true; } } // Add a new mail account for the user here if (!isset($_REQUEST['accountId'])) { $_REQUEST['accountId'] = 0; } $smarty->assign('accountId', $_REQUEST['accountId']); if (isset($_REQUEST['new_acc'])) { check_ticket('admin-mailin'); if (!account_ok($_REQUEST['pop'], $_REQUEST['username'], $_REQUEST['pass'])) { $tikifeedback[] = array('num' => 1, 'mes' => sprintf(tra('Mail-in account %s incorrect'), $_REQUEST['account'])); } else { $mailinlib->replace_mailin_account($_REQUEST['accountId'], $_REQUEST['account'], $_REQUEST['pop'], $_REQUEST['port'], $_REQUEST['username'], $_REQUEST['pass'], $_REQUEST['smtp'], $_REQUEST['useAuth'], $_REQUEST['smtpPort'], $_REQUEST['type'], $_REQUEST['active'], $_REQUEST['anonymous'], $_REQUEST['attachments'], $_REQUEST['article_topicId'], $_REQUEST['article_type'], $_REQUEST['discard_after'], $_REQUEST['show_inlineImages'], $_REQUEST['categoryId'], $_REQUEST['respond_email']); $tikifeedback[] = array('num' => 1, 'mes' => sprintf(tra('Mail-in account %s saved'), $_REQUEST['account'])); } } else { $smarty->assign('confirmation', 0); } if (isset($_REQUEST['remove'])) { $access->check_authenticity(); $mailinlib->remove_mailin_account($_REQUEST['remove']); } if ($_REQUEST['accountId']) { $info = $mailinlib->get_mailin_account($_REQUEST['accountId']); } else {
if (!$pop3) { $pop3->disconnect(); return false; } else { $pop3->disconnect(); return true; } } // Add a new mail account for the user here if (!isset($_REQUEST["accountId"])) { $_REQUEST["accountId"] = 0; } $smarty->assign('accountId', $_REQUEST["accountId"]); if (isset($_REQUEST["new_acc"])) { check_ticket('admin-mailin'); if (!account_ok($_REQUEST["pop"], $_REQUEST["username"], $_REQUEST["pass"])) { $tikifeedback[] = array('num' => 1, 'mes' => sprintf(tra("Mail-in account %s incorrect"), $_REQUEST["account"])); } else { $mailinlib->replace_mailin_account($_REQUEST["accountId"], $_REQUEST["account"], $_REQUEST["pop"], $_REQUEST["port"], $_REQUEST["username"], $_REQUEST["pass"], $_REQUEST["smtp"], $_REQUEST["useAuth"], $_REQUEST["smtpPort"], $_REQUEST["type"], $_REQUEST["active"], $_REQUEST["anonymous"], $_REQUEST["attachments"], $_REQUEST["article_topicId"], $_REQUEST["article_type"], $_REQUEST["discard_after"]); // $_REQUEST["accountId"] = 0; $tikifeedback[] = array('num' => 1, 'mes' => sprintf(tra("Mail-in account %s saved"), $_REQUEST["account"])); } } else { $smarty->assign('confirmation', 0); } if (isset($_REQUEST["remove"])) { $area = 'delmailin'; if ($feature_ticketlib2 != 'y' or isset($_POST['daconfirm']) and isset($_SESSION["ticket_{$area}"])) { key_check($area); $mailinlib->remove_mailin_account($_REQUEST["remove"]); } else {