summaryrefslogtreecommitdiffstats
path: root/lib/private/Mail/Mailer.php
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2018-09-27 02:12:02 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-11-02 13:57:43 +0100
commit7078a0e53e3b050c8008f9d8ae43c8d697fbc94c (patch)
tree9abc9bca121340f2373e3d14f014b15d188db423 /lib/private/Mail/Mailer.php
parent166907afef55056e1de4301d9f58b0e2a0098d41 (diff)
downloadnextcloud-server-7078a0e53e3b050c8008f9d8ae43c8d697fbc94c.tar.gz
nextcloud-server-7078a0e53e3b050c8008f9d8ae43c8d697fbc94c.zip
Mailer: discover sendmail path instead of hardcoding it to /usr/sbin/sendmail
`sendmail` can very well be in a path different from `/usr/sbin/sendmail`. We already search `$PATH` at `lib/private/Settings/Admin/Mail.php` to detect whether we want to offer sendmail as a mail transfer method, so let's be consistent and actually initialize `\Swift_SendmailTransport` with this path to sendmail, instead of just hardcoding `/usr/sbin/sendmail`. Signed-off-by: Florian Klink <flokli@flokli.de>
Diffstat (limited to 'lib/private/Mail/Mailer.php')
-rw-r--r--lib/private/Mail/Mailer.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php
index 6f148bc0c6e..79208f9a695 100644
--- a/lib/private/Mail/Mailer.php
+++ b/lib/private/Mail/Mailer.php
@@ -274,7 +274,7 @@ class Mailer implements IMailer {
$binaryPath = '/var/qmail/bin/sendmail';
break;
default:
- $binaryPath = '/usr/sbin/sendmail';
+ $binaryPath = \OC_Helper::findBinaryPath('sendmail');
break;
}