Skip to content

Commit 83c6dc5

Browse files
thlehmann-ionosprintminion-co
authored andcommitted
feat(Mailer): hide admin settings for "null" transport
When the mail transport is configured as null transport, the configuration UI would not work. == Background The null transport is meant for situations where operators implement mail delivery via custom mechanisms like REST APIs. Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
1 parent a6b981e commit 83c6dc5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

apps/settings/templates/settings/admin/additional-mail.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@
3434
?>
3535

3636
<div class="section" id="mail_general_settings">
37+
<?php if ($_['mail_smtpmode'] === 'null') { ?>
38+
<h2><?php p($l->t('Email server'));?></h2>
39+
40+
<p>
41+
<?php p($l->t('Mail delivery is disabled by instance config "%s".', ['mail_smtpmode'])); ?>
42+
</p>
43+
<?php } else { ?>
3744
<form id="mail_general_settings_form" class="mail_settings">
3845
<h2><?php p($l->t('Email server'));?></h2>
3946
<a target="_blank"
@@ -143,4 +150,5 @@
143150
<em><?php p($l->t('Test and verify email settings')); ?></em>
144151
<input type="submit" name="sendtestemail" id="sendtestemail" value="<?php p($l->t('Send email')); ?>"/>
145152
<span id="sendtestmail_msg" class="msg"></span>
153+
<?php } ?>
146154
</div>

0 commit comments

Comments
 (0)