diff options
author | Robin Appelman <robin@icewind.nl> | 2024-09-16 18:18:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-16 18:18:14 +0200 |
commit | ede0c26b78722f07ea4b672ff7c00f9723e0454e (patch) | |
tree | 238ce2f166036f21a1af1cca01a9e878162a2e91 /apps | |
parent | dde0b48c9375ed4f5fd7bac3b03e2b1c75ce9926 (diff) | |
parent | 87aa1267a84cef6f8d6bd43956fab2787c80627c (diff) | |
download | nextcloud-server-ede0c26b78722f07ea4b672ff7c00f9723e0454e.tar.gz nextcloud-server-ede0c26b78722f07ea4b672ff7c00f9723e0454e.zip |
Merge pull request #46480 from nextcloud/fix/mailer-binaryfinder-fallback
fix(Mailer): Fix sendmail binary fallback
Diffstat (limited to 'apps')
-rw-r--r-- | apps/settings/lib/Settings/Admin/Mail.php | 3 | ||||
-rw-r--r-- | apps/settings/tests/Settings/Admin/MailTest.php | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/apps/settings/lib/Settings/Admin/Mail.php b/apps/settings/lib/Settings/Admin/Mail.php index 0775b50aaa1..a94e3da18fe 100644 --- a/apps/settings/lib/Settings/Admin/Mail.php +++ b/apps/settings/lib/Settings/Admin/Mail.php @@ -6,6 +6,7 @@ namespace OCA\Settings\Settings\Admin; use OCP\AppFramework\Http\TemplateResponse; +use OCP\IBinaryFinder; use OCP\IConfig; use OCP\IL10N; use OCP\Settings\IDelegatedSettings; @@ -32,7 +33,7 @@ class Mail implements IDelegatedSettings { public function getForm() { $parameters = [ // Mail - 'sendmail_is_available' => (bool)\OC_Helper::findBinaryPath('sendmail'), + 'sendmail_is_available' => (bool)\OCP\Server::get(IBinaryFinder::class)->findBinaryPath('sendmail'), 'mail_domain' => $this->config->getSystemValue('mail_domain', ''), 'mail_from_address' => $this->config->getSystemValue('mail_from_address', ''), 'mail_smtpmode' => $this->config->getSystemValue('mail_smtpmode', ''), diff --git a/apps/settings/tests/Settings/Admin/MailTest.php b/apps/settings/tests/Settings/Admin/MailTest.php index 021dbac241b..8ea0ea9bb0c 100644 --- a/apps/settings/tests/Settings/Admin/MailTest.php +++ b/apps/settings/tests/Settings/Admin/MailTest.php @@ -7,6 +7,7 @@ namespace OCA\Settings\Tests\Settings\Admin; use OCA\Settings\Settings\Admin\Mail; use OCP\AppFramework\Http\TemplateResponse; +use OCP\IBinaryFinder; use OCP\IConfig; use OCP\IL10N; use Test\TestCase; @@ -51,7 +52,7 @@ class MailTest extends TestCase { 'settings', 'settings/admin/additional-mail', [ - 'sendmail_is_available' => (bool)\OC_Helper::findBinaryPath('sendmail'), + 'sendmail_is_available' => (bool)\OCP\Server::get(IBinaryFinder::class)->findBinaryPath('sendmail'), 'mail_domain' => 'mx.nextcloud.com', 'mail_from_address' => 'no-reply@nextcloud.com', 'mail_smtpmode' => 'smtp', |