Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-10-08 17:46:42 +0300
committerLukas Reschke <lukas@owncloud.com>2015-10-14 17:29:55 +0300
commit5ed1744a6fd07195a3b11ea6d94a91caefdac3a4 (patch)
tree8f3051f2aacb3546374dc891ccb558fd2e61118f
parent85c8af596d622e114292fe847a94eec71ff5c668 (diff)
Setup sendmail transport
Replaces https://github.com/owncloud/core/pull/19047 and fixes https://github.com/owncloud/enterprise/issues/854 and https://github.com/owncloud/core/issues/19110
-rw-r--r--lib/private/mail/mailer.php5
-rw-r--r--tests/lib/mail/mailer.php2
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/private/mail/mailer.php b/lib/private/mail/mailer.php
index d083b992326..bd93f3e3d58 100644
--- a/lib/private/mail/mailer.php
+++ b/lib/private/mail/mailer.php
@@ -157,7 +157,10 @@ class Mailer implements IMailer {
$this->instance = $this->getSMTPInstance();
break;
case 'sendmail':
- $this->instance = $this->getSendMailInstance();
+ // FIXME: Move into the return statement but requires proper testing
+ // for SMTP and mail as well. Thus not really doable for a
+ // minor release.
+ $this->instance = \Swift_Mailer::newInstance($this->getSendMailInstance());
break;
default:
$this->instance = $this->getMailInstance();
diff --git a/tests/lib/mail/mailer.php b/tests/lib/mail/mailer.php
index 21565f9ffb5..8023cda820e 100644
--- a/tests/lib/mail/mailer.php
+++ b/tests/lib/mail/mailer.php
@@ -77,7 +77,7 @@ class MailerTest extends TestCase {
->method('getSystemValue')
->will($this->returnValue('sendmail'));
- $this->assertInstanceOf('\Swift_SendmailTransport', self::invokePrivate($this->mailer, 'getInstance'));
+ $this->assertInstanceOf('\Swift_Mailer', self::invokePrivate($this->mailer, 'getInstance'));
}
public function testCreateMessage() {