summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-11-02 16:17:02 +0100
committerGitHub <noreply@github.com>2018-11-02 16:17:02 +0100
commit4ba709bb7174c260c29e728dfe623c007c1ffc56 (patch)
tree5b3edd4ee00029cc3de4133f818668f42461d0be /lib
parent30a1237f8115683fc375395d842f3f4fc555b1e0 (diff)
parent054056a8df9b5fd6651db7fbe771ca04ba37761a (diff)
downloadnextcloud-server-4ba709bb7174c260c29e728dfe623c007c1ffc56.tar.gz
nextcloud-server-4ba709bb7174c260c29e728dfe623c007c1ffc56.zip
Merge pull request #11404 from flokli/sendmail-path
Mailer: discover sendmail path instead of hardcoding it to /usr/sbin/sendmail
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Mail/Mailer.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php
index 6f148bc0c6e..df23b669365 100644
--- a/lib/private/Mail/Mailer.php
+++ b/lib/private/Mail/Mailer.php
@@ -274,7 +274,11 @@ class Mailer implements IMailer {
$binaryPath = '/var/qmail/bin/sendmail';
break;
default:
- $binaryPath = '/usr/sbin/sendmail';
+ $sendmail = \OC_Helper::findBinaryPath('sendmail');
+ if ($sendmail === null) {
+ $sendmail = '/usr/sbin/sendmail';
+ }
+ $binaryPath = $sendmail;
break;
}