diff options
author | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2014-02-26 14:41:07 +0100 |
---|---|---|
committer | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2014-02-26 14:41:07 +0100 |
commit | d9a153dbe91a775be533869b4d80ddaa33609ca8 (patch) | |
tree | 6096cf0653a95d9ac941cbd0f4dffc5bf080bd2d /settings/templates | |
parent | 84eea47991d33922345e4fb15f7e74638e2a7ccc (diff) | |
parent | 9847912257de1910f99879caac8ea925fb85caed (diff) | |
download | nextcloud-server-d9a153dbe91a775be533869b4d80ddaa33609ca8.tar.gz nextcloud-server-d9a153dbe91a775be533869b4d80ddaa33609ca8.zip |
Merge pull request #7174 from owncloud/issue/7166
Add option to change email settings in admin section
Diffstat (limited to 'settings/templates')
-rw-r--r-- | settings/templates/admin.php | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/settings/templates/admin.php b/settings/templates/admin.php index 0eabffb9316..139a9dd076c 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -11,6 +11,27 @@ $levelLabels = array( $l->t( 'Errors and fatal issues' ), $l->t( 'Fatal issues only' ), ); + +$mail_smtpauthtype = array( + '' => $l->t('None'), + 'LOGIN' => $l->t('Login'), + 'PLAIN' => $l->t('Plain'), + 'NTLM' => $l->t('NT LAN Manager'), +); + +$mail_smtpsecure = array( + '' => $l->t('None'), + 'ssl' => $l->t('SSL'), + 'tls' => $l->t('TLS'), +); + +$mail_smtpmode = array( + 'sendmail', + 'smtp', + 'qmail', + 'php', +); + ?> <?php @@ -250,6 +271,84 @@ if (!$_['internetconnectionworking']) { </table> </fieldset> +<fieldset id="mail_settings" class="personalblock"> + <h2><?php p($l->t('Email Server'));?> <span class="msg"></span></h2> + + <p><?php p($l->t('This is used for sending out notifications.')); ?></p> + + <p> + <label for="mail_smtpmode"><?php p($l->t( 'Send mode' )); ?></label> + <select name='mail_smtpmode' id='mail_smtpmode'> + <?php foreach ($mail_smtpmode as $smtpmode): + $selected = ''; + if ($smtpmode == $_['mail_smtpmode']): + $selected = 'selected="selected"'; + endif; ?> + <option value='<?php p($smtpmode)?>' <?php p($selected) ?>><?php p($smtpmode) ?></option> + <?php endforeach;?> + </select> + + <label id="mail_smtpsecure_label" for="mail_smtpsecure" + <?php if ($_['mail_smtpmode'] != 'smtp') print_unescaped(' class="hidden"'); ?>> + <?php p($l->t( 'Encryption' )); ?> + </label> + <select name="mail_smtpsecure" id="mail_smtpsecure" + <?php if ($_['mail_smtpmode'] != 'smtp') print_unescaped(' class="hidden"'); ?>> + <?php foreach ($mail_smtpsecure as $secure => $name): + $selected = ''; + if ($secure == $_['mail_smtpsecure']): + $selected = 'selected="selected"'; + endif; ?> + <option value='<?php p($secure)?>' <?php p($selected) ?>><?php p($name) ?></option> + <?php endforeach;?> + </select> + </p> + + <p> + <label for="mail_from_address"><?php p($l->t( 'From address' )); ?></label> + <input type="text" name='mail_from_address' id="mail_from_address" placeholder="<?php p('mail')?>" + value='<?php p($_['mail_from_address']) ?>' /> + @ + <input type="text" name='mail_domain' id="mail_domain" placeholder="<?php p('example.com')?>" + value='<?php p($_['mail_domain']) ?>' /> + </p> + + <p id="setting_smtpauth" <?php if ($_['mail_smtpmode'] != 'smtp') print_unescaped(' class="hidden"'); ?>> + <label for="mail_smtpauthtype"><?php p($l->t( 'Authentification method' )); ?></label> + <select name='mail_smtpauthtype' id='mail_smtpauthtype'> + <?php foreach ($mail_smtpauthtype as $authtype => $name): + $selected = ''; + if ($authtype == $_['mail_smtpauthtype']): + $selected = 'selected="selected"'; + endif; ?> + <option value='<?php p($authtype)?>' <?php p($selected) ?>><?php p($name) ?></option> + <?php endforeach;?> + </select> + + <input type="checkbox" name="mail_smtpauth" id="mail_smtpauth" value="1" + <?php if ($_['mail_smtpauth']) print_unescaped('checked="checked"'); ?> /> + <label for="mail_smtpauth"><?php p($l->t( 'Authentication required' )); ?></label> + </p> + + <p id="setting_smtphost" <?php if ($_['mail_smtpmode'] != 'smtp') print_unescaped(' class="hidden"'); ?>> + <label for="mail_smtphost"><?php p($l->t( 'Server address' )); ?></label> + <input type="text" name='mail_smtphost' id="mail_smtphost" placeholder="<?php p('smtp.example.com')?>" + value='<?php p($_['mail_smtphost']) ?>' /> + : + <input type="text" name='mail_smtpport' id="mail_smtpport" placeholder="<?php p($l->t('Port'))?>" + value='<?php p($_['mail_smtpport']) ?>' /> + </p> + + <p id="mail_credentials" <?php if (!$_['mail_smtpauth'] || $_['mail_smtpmode'] != 'smtp') print_unescaped(' class="hidden"'); ?>> + <label for="mail_smtpname"><?php p($l->t( 'Credentials' )); ?></label> + <input type="text" name='mail_smtpname' id="mail_smtpname" placeholder="<?php p($l->t('SMTP Username'))?>" + value='<?php p($_['mail_smtpname']) ?>' /> + <input type="password" name='mail_smtppassword' id="mail_smtppassword" + placeholder="<?php p($l->t('SMTP Password'))?>" value='<?php p($_['mail_smtppassword']) ?>' /> + </p> + +</fieldset> + <fieldset class="personalblock"> <h2><?php p($l->t('Log'));?></h2> <?php p($l->t('Log level'));?> <select name='loglevel' id='loglevel'> |