$_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.php'); 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.php'); 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 .= ''; output('

E-Mail-Account anlegen

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 unter Domains.

'.html_form('email_imap_create', 'imap.php', '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.php'); die(); } elseif ($sure === false) { if (! $debugmode) header("Location: imap.php"); die(); } } elseif (isset($_GET['edit'])) { output('

E-Mail-Account bearbeiten

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.php', 'action=save&id='.$_GET['edit'], $form)); } else { output('

E-Mail-Accounts

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.php', $account['account'], 'edit='.$account['id']).' '.$mailbox.' '.($account['enabled'] ? 'Ja' : 'Nein').' löschen

Neuen Account anlegen

'); } ?>