Skip to content

Commit

Permalink
feat(Mailer): hide admin settings for "null" transport
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
thlehmann-ionos committed Nov 19, 2024
1 parent e4c013d commit 3f6c969
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/settings/templates/settings/admin/additional-mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
?>

<div class="section" id="mail_general_settings">
<?php if ($_['mail_smtpmode'] === 'null') { ?>
<h2><?php p($l->t('Email server'));?></h2>

<p>
<?php p($l->t('Mail delivery is disabled by instance config "%s".', ['mail_smtpmode'])); ?>
</p>
<?php } else { ?>
<form id="mail_general_settings_form" class="mail_settings">
<h2><?php p($l->t('Email server'));?></h2>
<a target="_blank"
Expand Down Expand Up @@ -143,4 +150,5 @@
<em><?php p($l->t('Test and verify email settings')); ?></em>
<input type="submit" name="sendtestemail" id="sendtestemail" value="<?php p($l->t('Send email')); ?>"/>
<span id="sendtestmail_msg" class="msg"></span>
<?php } ?>
</div>

0 comments on commit 3f6c969

Please sign in to comment.