Skip to content

Commit

Permalink
chore: remove email config mail_smtpauthtype - this is now auto det…
Browse files Browse the repository at this point in the history
…ected
  • Loading branch information
DeepDiver1975 committed Oct 4, 2023
1 parent 2bae916 commit 623f70b
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 31 deletions.
8 changes: 0 additions & 8 deletions config/config.sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,14 +450,6 @@
*/
'mail_smtpauth' => false,

/**
* Define the SMTP authentication type
* Depends on `mail_smtpmode`. If SMTP authentication is required,
* choose the authentication type as `LOGIN` (default) or `PLAIN`.
*/
# TODO: drop it - symfony mailer is auto detecting this
'mail_smtpauthtype' => 'LOGIN',

/**
* Define the SMTP authentication username
* Depends on `mail_smtpauth`. Specify the username for authenticating to the SMTP server.
Expand Down
2 changes: 0 additions & 2 deletions settings/Controller/MailSettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ public function __construct(
* @param string $mail_smtpmode
* @param string $mail_smtpsecure
* @param string $mail_smtphost
* @param string $mail_smtpauthtype
* @param int $mail_smtpauth
* @param string $mail_smtpport
* @return array
Expand All @@ -96,7 +95,6 @@ public function setMailSettings(
$mail_smtpmode,
$mail_smtpsecure,
$mail_smtphost,
$mail_smtpauthtype,
$mail_smtpauth,
$mail_smtpport
) {
Expand Down
1 change: 0 additions & 1 deletion settings/Panels/Admin/Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public function getPanel() {
$template->assign('mail_smtpsecure', $this->config->getSystemValue("mail_smtpsecure", ''));
$template->assign('mail_smtphost', $this->config->getSystemValue("mail_smtphost", ''));
$template->assign('mail_smtpport', $this->config->getSystemValue("mail_smtpport", ''));
$template->assign('mail_smtpauthtype', $this->config->getSystemValue("mail_smtpauthtype", ''));
$template->assign('mail_smtpauth', $this->config->getSystemValue("mail_smtpauth", false));
$template->assign('mail_smtpname', $this->config->getSystemValue("mail_smtpname", ''));
$template->assign('mail_user_email', $this->userSession->getUser()->getEMailAddress());
Expand Down
17 changes: 0 additions & 17 deletions settings/templates/panels/admin/mail.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
<?php
script('settings', 'panels/mail');
$mail_smtpauthtype = [
'' => $l->t('None'),
'LOGIN' => $l->t('Login'),
'PLAIN' => $l->t('Plain'),
'NTLM' => $l->t('NT LAN Manager'),
];
$mail_smtpsecure = [
'' => $l->t('None'),
'ssl' => $l->t('SSL/TLS'),
Expand Down Expand Up @@ -80,17 +74,6 @@
<p id="setting_smtpauth" <?php if ($_['mail_smtpmode'] != 'smtp') {
print_unescaped(' class="hidden"');
} ?>>
<label for="mail_smtpauthtype"><?php p($l->t('Authentication method')); ?></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" class="checkbox" value="1"
<?php if ($_['mail_smtpauth']) {
print_unescaped('checked="checked"');
Expand Down
3 changes: 0 additions & 3 deletions tests/acceptance/features/lib/AdminGeneralSettingsPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class AdminGeneralSettingsPage extends OwncloudPage {
protected $encryptionTypeId = 'mail_smtpsecure';
protected $mailFromAddressFieldId = 'mail_from_address';
protected $mailDomainFieldId = 'mail_domain';
protected $authMethodTypeId = 'mail_smtpauthtype';
protected $authRequiredCheckboxXpath = '//label[@for="mail_smtpauth"]';
protected $authRequiredCheckboxId = 'mail_smtpauth';
protected $serverAddressFieldId = 'mail_smtphost';
Expand Down Expand Up @@ -89,8 +88,6 @@ public function setEmailServerSettings(Session $session, TableNode $emailSetting
$this->fillField($this->mailFromAddressFieldId, $row['value']);
} elseif ($row['setting'] === 'mail domain') {
$this->fillField($this->mailDomainFieldId, $row['value']);
} elseif ($row['setting'] === 'authentication method') {
$this->selectFieldOption($this->authMethodTypeId, $row['value']);
} elseif ($row['setting'] === 'authentication required') {
$this->checkRequiredAuthentication($row['value']);
} elseif ($row['setting'] === 'server address') {
Expand Down

0 comments on commit 623f70b

Please sign in to comment.