diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-11-29 17:43:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-29 17:43:03 +0100 |
commit | ee2cb46cdc161fc0e90f4c9bea40607511d1087e (patch) | |
tree | e0a6e0eaf2d2f5e2b3d18a582f9bd3aae438cebc /settings | |
parent | f77e519137d8b934ce599548a0ce3bdd81b826a2 (diff) | |
parent | 4a2c56b71400de7a044e0a3c05a62ae34c4c4d69 (diff) | |
download | nextcloud-server-ee2cb46cdc161fc0e90f4c9bea40607511d1087e.tar.gz nextcloud-server-ee2cb46cdc161fc0e90f4c9bea40607511d1087e.zip |
Merge pull request #12424 from nextcloud/feature/add-pipe-mode-for-sendmail
Add pipe mode for sendmail
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> |