summaryrefslogtreecommitdiffstats
path: root/settings/templates/admin.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-02-12 17:21:41 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-02-18 14:26:03 +0100
commit8387cd8ae35a0ad94a49a27ad8622bb7b8ed2b06 (patch)
tree30a304dcae073ea3b6ee409a279fc4946fd0a199 /settings/templates/admin.php
parent3699728a3a02dd17ea617a7e8f781c09e837f360 (diff)
downloadnextcloud-server-8387cd8ae35a0ad94a49a27ad8622bb7b8ed2b06.tar.gz
nextcloud-server-8387cd8ae35a0ad94a49a27ad8622bb7b8ed2b06.zip
Add option to change email settings in admin section
Fix issue #7166
Diffstat (limited to 'settings/templates/admin.php')
-rw-r--r--settings/templates/admin.php88
1 files changed, 88 insertions, 0 deletions
diff --git a/settings/templates/admin.php b/settings/templates/admin.php
index 0eabffb9316..d81840b5b66 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,73 @@ 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 for="mail_smtpsecure"><?php p($l->t( 'Encryption' )); ?></label>
+ <select name='mail_smtpsecure' id='mail_smtpsecure'>
+ <?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_smtpauthtype"><?php p($l->t( 'Authentification method for SMTP' )); ?></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="mail_credentials" <?php if (!$_['mail_smtpauth']) print_unescaped(' style="display: none;"'); ?>>
+ <label for="mail_smtpname"><?php p($l->t( 'SMTP 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>
+
+ <p>
+ <label for="mail_smtphost"><?php p($l->t( 'SMTP 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>
+ <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('owncloud')?>" 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>
+
+</fieldset>
+
<fieldset class="personalblock">
<h2><?php p($l->t('Log'));?></h2>
<?php p($l->t('Log level'));?> <select name='loglevel' id='loglevel'>