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
This commit is contained in:
parent
1227786930
commit
18394205c2
|
@ -157,7 +157,10 @@ class Mailer implements IMailer {
|
||||||
$this->instance = $this->getSMTPInstance();
|
$this->instance = $this->getSMTPInstance();
|
||||||
break;
|
break;
|
||||||
case 'sendmail':
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
$this->instance = $this->getMailInstance();
|
$this->instance = $this->getMailInstance();
|
||||||
|
|
|
@ -77,7 +77,7 @@ class MailerTest extends TestCase {
|
||||||
->method('getSystemValue')
|
->method('getSystemValue')
|
||||||
->will($this->returnValue('sendmail'));
|
->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() {
|
public function testCreateMessage() {
|
||||||
|
|
Loading…
Reference in New Issue