From 8fcaf407e6fa627173c8225e4dda5f7ee533ec9b Mon Sep 17 00:00:00 2001 From: Michael Kuron Date: Mon, 10 Jul 2017 21:02:30 +0200 Subject: [PATCH] Client configuration link --- data/web/lang/lang.de.php | 1 + data/web/lang/lang.en.php | 1 + data/web/user.php | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/data/web/lang/lang.de.php b/data/web/lang/lang.de.php index eef13b3f..8706e4ba 100644 --- a/data/web/lang/lang.de.php +++ b/data/web/lang/lang.de.php @@ -108,6 +108,7 @@ $lang['user']['user_settings'] = 'Benutzereinstellungen'; $lang['user']['mailbox_settings'] = 'Mailbox-Einstellungen'; $lang['user']['mailbox_details'] = 'Mailbox-Details'; $lang['user']['change_password'] = 'Passwort ändern'; +$lang['user']['client_configuration'] = 'Konfigurationsanleitungen für E-Mail-Programme und Smartphones anzeigen'; $lang['user']['new_password'] = 'Neues Passwort'; $lang['user']['save_changes'] = 'Änderungen speichern'; $lang['user']['password_now'] = 'Aktuelles Passwort (Änderungen bestätigen)'; diff --git a/data/web/lang/lang.en.php b/data/web/lang/lang.en.php index 3be72fec..fceef80f 100644 --- a/data/web/lang/lang.en.php +++ b/data/web/lang/lang.en.php @@ -110,6 +110,7 @@ $lang['user']['user_settings'] = 'User settings'; $lang['user']['mailbox_settings'] = 'Mailbox settings'; $lang['user']['mailbox_details'] = 'Mailbox details'; $lang['user']['change_password'] = 'Change password'; +$lang['user']['client_configuration'] = 'Show configuration guides for email clients and smartphones'; $lang['user']['new_password'] = 'New password'; $lang['user']['save_changes'] = 'Save changes'; $lang['user']['password_now'] = 'Current password (confirm changes)'; diff --git a/data/web/user.php b/data/web/user.php index 77ccc62d..17a06302 100644 --- a/data/web/user.php +++ b/data/web/user.php @@ -64,6 +64,25 @@ elseif (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == ' $_SESSION['return_to'] = $_SERVER['REQUEST_URI']; $username = $_SESSION['mailcow_cc_username']; $mailboxdata = mailbox('get', 'mailbox_details', $username); + + $clientconfigstr = "host=" . urlencode($mailcow_hostname) . "&email=" . urlencode($username) . "&name=" . urlencode($mailboxdata['name']) . "&port=" . urlencode($autodiscover_config['caldav']['port']); + if ($autodiscover_config['useEASforOutlook'] == 'yes') + $clientconfigstr .= "&outlookEAS=1"; + if (file_exists('thunderbird-plugins/version.csv')) + { + $fh = fopen('thunderbird-plugins/version.csv', 'r'); + if ($fh) + { + while (($row = fgetcsv($fh, 1000, ';')) !== FALSE) + { + if ($row[0] == 'sogo-integrator@inverse.ca') { + $clientconfigstr .= "&integrator=" . urlencode($row[1]); + } + } + fclose($fh); + } + } + ?>

@@ -74,6 +93,7 @@ elseif (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == '

[]

+

[]