$_GET['id'], 'account' => $account, 'mailbox' => $_POST['mailbox'], 'enabled' => $enabled); if ($_POST['password'] != '') $acc['password'] = $_POST['password']; $error = check_valid($acc); if ($error != "") { input_error($error); $title = "E-Mail-Accounts"; output(""); } else { change_mailaccount($_GET['id'], $acc); if (! $debugmode) header('Location: imap'); die(); } } elseif (isset($_POST['create'])) { check_form_token('email_imap_create'); $account = $_POST['user'].'@'.$_POST['domain']; if (isset($_POST['enabled']) && $_POST['enabled'] == 'true') $enabled = 'Y'; else $enabled = 'N'; $acc = array('account' => $account, 'mailbox' => $_POST['mailbox'], 'enabled' => $enabled); if ($_POST['password'] != '') $acc['password'] = $_POST['password']; $error = check_valid($acc); if ($error != "") { input_error($error); output(""); } else { create_mailaccount($acc); if (! $debugmode) header('Location: imap'); die(); } } } elseif (isset($_GET['action']) && $_GET['action'] == 'create') { $options = ''; $domains = get_domain_list($user['customerno'], $user['uid']); if (count($domains) > 0) $options .= ''; foreach ($domains as $dom) $options .= ''; title("IMAP-Account anlegen"); output('

Hier können Sie ein neues POP3/IMAP-Konto anlegen.

ACHTUNG: ein POP3-/IMAP-Account ist keine E-Mail-Adresse. Wenn Sie sich nicht sicher sind, lesen Sie bitte die Anleitung in unserem Wiki. Sie können Ihre E-Mail-Konten auch über eine einfachere Möglichkeit verwalten, dann ist eine Einrichtung über diese Weboberfläche möglich. Die Umstellung erfolgt '.internal_link("../email/domains", "unter Domains").'.

'.html_form('email_imap_create', 'imap', 'action=save', '
Einstellung:Wert: 
Benutzername: @
Mailbox:
Passwort:
Account sofort aktivieren:

')); } elseif (isset($_GET['action']) && $_GET['action'] == 'delete' && $_GET['account'] != '') { $sure = user_is_sure(); if ($sure === NULL) { $_GET['account'] = (int) $_GET['account']; $account = get_mailaccount($_GET['account']); $enabled = ($account['enabled'] ? 'Ja' : 'Nein'); are_you_sure("action=delete&account={$_GET['account']}", '

Soll der folgende Account wirklich gelöscht werden?

Benutzername: '.filter_input_general($account['account']).'
Mailbox: '.filter_input_general($account['mailbox']).'
Konto aktiv: '.$enabled.'
'); } elseif ($sure === true) { delete_mailaccount($_GET['account']); if (! $debugmode) header('Location: imap'); die(); } elseif ($sure === false) { if (! $debugmode) header("Location: imap"); die(); } } elseif (isset($_GET['edit'])) { title("IMAP-Account bearbeiten"); output('

Hier können Sie die Einstellungen des IMAP-Kontos bearbeiten.

'); $_GET['edit'] = (int) $_GET['edit']; $account = get_mailaccount($_GET['edit']); list($username, $domain) = explode('@', $account['account'], 2); $enabled = ($account['enabled'] ? ' checked="checked"' : ''); $form = '
Einstellung:alter Wert:neuer Wert: 
Benutzername: @
Mailbox:
Passwort:nicht angezeigt
Konto aktiv:    


Hinweis: Das Passwort wird nur geändert, wenn Sie auf dieser Seite eines eingeben. Geben Sie keines an, wird das bisherige beibehalten!

'; output(html_form('email_imap_edit', 'imap', 'action=save&id='.$_GET['edit'], $form)); } else { title("IMAP-Accounts"); if (user_has_only_vmail_domains()) { output('
Achtung: Alle Ihre Domains sind auf Webinterface-Verwaltung konfiguriert. Sie können dennoch manuelle IMAP-Konten für Ihre speziellen Konfigurationen anlegen, in der Regel sollten Sie aber hier keine IMAP-Acccounts anlegen. Dies kann zu Fehlfunktionen führen.
'); } output('

Folgende POP3/IMAP-Konten sind eingerichtet:

'); foreach (mailaccounts($user['uid']) as $account) { $mailbox = $account['mailbox']; if (empty($mailbox)) $mailbox = 'nicht festgelegt'; output(''); } output('
Kontoname:Mailbox-Pfad:aktiv 
'.internal_link('imap', $account['account'], 'edit='.$account['id']).' '.$mailbox.' '.($account['enabled'] ? 'Ja' : 'Nein').' '.internal_link("imap", icon_delete("»{$account['account']}« löschen"), "action=delete&account=".$account['id']).'
'); if (imap_on_vmail_domain()) { output('
Achtung: Es scheint als hätten Sie einen (manuellen) IMAP-Account mittels einer Domain angelegt, die für Webinterface-Verwaltung konfiguriert ist. Sollten Sie nicht genau wissen was Sie tun, ist das vermutlich falsch und wird zu Fehlfunktionen führen.
'); } addnew("imap", "Neuen Account anlegen", "action=create"); output('

'.other_icon('information.png', 'Zugangsdaten anzeigen').' '.internal_link('logindata', 'Zugangsdaten für E-Mail-Abruf anzeigen', 'server='.get_server_by_id($_SESSION['userinfo']['server']).'&type=manual').'

'); } ?>