diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2018-11-12 23:27:18 +0100 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2018-11-29 16:02:36 +0100 |
commit | 92675a606e90a57745ee1059e56d264a3213c954 (patch) | |
tree | 1f464b2894e8ee14925a6de706893365a96cc907 /settings | |
parent | 446d96f3eb405302b75a3f0de094019dc25e5b44 (diff) | |
download | nextcloud-server-92675a606e90a57745ee1059e56d264a3213c954.tar.gz nextcloud-server-92675a606e90a57745ee1059e56d264a3213c954.zip |
Add sendmailmode to gui
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'settings')
-rw-r--r-- | settings/Controller/MailSettingsController.php | 3 | ||||
-rw-r--r-- | settings/js/admin.js | 2 | ||||
-rw-r--r-- | settings/templates/settings/admin/additional-mail.php | 14 |
3 files changed, 18 insertions, 1 deletions
diff --git a/settings/Controller/MailSettingsController.php b/settings/Controller/MailSettingsController.php index d1ceb14a63c..5d2e67ce6e3 100644 --- a/settings/Controller/MailSettingsController.php +++ b/settings/Controller/MailSettingsController.php @@ -91,7 +91,8 @@ class MailSettingsController extends Controller { $mail_smtphost, $mail_smtpauthtype, $mail_smtpauth, - $mail_smtpport) { + $mail_smtpport, + $mail_sendmailmode) { $params = get_defined_vars(); $configs = []; diff --git a/settings/js/admin.js b/settings/js/admin.js index 56bbaead520..1c766ef51a5 100644 --- a/settings/js/admin.js +++ b/settings/js/admin.js @@ -158,6 +158,7 @@ $(document).ready(function(){ $('#mail_smtpsecure_label').addClass('hidden'); $('#mail_smtpsecure').addClass('hidden'); $('#mail_credentials').addClass('hidden'); + $('#mail_sendmailmode_label, #mail_sendmailmode').removeClass('hidden'); } else { $('#setting_smtpauth').removeClass('hidden'); $('#setting_smtphost').removeClass('hidden'); @@ -166,6 +167,7 @@ $(document).ready(function(){ if ($('#mail_smtpauth').is(':checked')) { $('#mail_credentials').removeClass('hidden'); } + $('#mail_sendmailmode_label, #mail_sendmailmode').addClass('hidden'); } }); diff --git a/settings/templates/settings/admin/additional-mail.php b/settings/templates/settings/admin/additional-mail.php index 0a708015968..362c301281d 100644 --- a/settings/templates/settings/admin/additional-mail.php +++ b/settings/templates/settings/admin/additional-mail.php @@ -47,6 +47,11 @@ if ($_['mail_smtpmode'] === 'qmail') { $mail_smtpmode[] = ['qmail', 'qmail']; } +$mail_sendmailmode = [ + 'smtp' => 'smtp (-bs)', + 'pipe' => 'pipe (-t)' +]; + ?> <div class="section" id="mail_general_settings"> @@ -84,6 +89,15 @@ if ($_['mail_smtpmode'] === 'qmail') { <option value="<?php p($secure)?>" <?php p($selected) ?>><?php p($name) ?></option> <?php endforeach;?> </select> + + <label id="mail_sendmailmode_label" for="mail_sendmailmode" class="<?= $_['mail_smtpmode'] !== 'sendmail' ? 'hidden' : '' ?>"> + <?php p($l->t('Sendmail mode')); ?> + </label> + <select name="mail_sendmailmode" id="mail_sendmailmode" class="<?= $_['mail_smtpmode'] !== 'sendmail' ? 'hidden' : '' ?>"> + <?php foreach ($mail_sendmailmode as $sendmailmodeValue => $sendmailmodeLabel): ?> + <option value="<?php p($sendmailmodeValue)?>" <?= $sendmailmodeValue === $_['mail_sendmailmode'] ? 'selected="selected"' : '' ?>><?php p($sendmailmodeLabel) ?></option> + <?php endforeach;?> + </select> </p> <p> |