summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
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;
}