Skip to content

Commit

Permalink
Setup sendmail transport
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasReschke committed Oct 14, 2015
1 parent 85c8af5 commit 5ed1744
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/private/mail/mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ protected function getInstance() {
$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();
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/mail/mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function testGetInstanceSendmail() {
->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() {
Expand Down

0 comments on commit 5ed1744

Please sign in to comment.