diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-11-02 16:17:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-02 16:17:02 +0100 |
commit | 4ba709bb7174c260c29e728dfe623c007c1ffc56 (patch) | |
tree | 5b3edd4ee00029cc3de4133f818668f42461d0be /lib | |
parent | 30a1237f8115683fc375395d842f3f4fc555b1e0 (diff) | |
parent | 054056a8df9b5fd6651db7fbe771ca04ba37761a (diff) | |
download | nextcloud-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.php | 6 |
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; } |