Merge pull request #3177 from nextcloud/default-value-mail_smtpmode
Fix default of mail_smtpmode
This commit is contained in:
commit
33ca69166a
3 changed files with 5 additions and 5 deletions
|
@ -310,9 +310,9 @@ $CONFIG = array(
|
||||||
* For ``qmail`` the binary is /var/qmail/bin/sendmail, and it must be installed
|
* For ``qmail`` the binary is /var/qmail/bin/sendmail, and it must be installed
|
||||||
* on your Unix system.
|
* on your Unix system.
|
||||||
*
|
*
|
||||||
* Defaults to ``sendmail``
|
* Defaults to ``php``
|
||||||
*/
|
*/
|
||||||
'mail_smtpmode' => 'sendmail',
|
'mail_smtpmode' => 'php',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This depends on ``mail_smtpmode``. Specify the IP address of your mail
|
* This depends on ``mail_smtpmode``. Specify the IP address of your mail
|
||||||
|
|
|
@ -200,7 +200,7 @@ class Mailer implements IMailer {
|
||||||
* @return \Swift_SendmailTransport
|
* @return \Swift_SendmailTransport
|
||||||
*/
|
*/
|
||||||
protected function getSendMailInstance() {
|
protected function getSendMailInstance() {
|
||||||
switch ($this->config->getSystemValue('mail_smtpmode', 'sendmail')) {
|
switch ($this->config->getSystemValue('mail_smtpmode', 'php')) {
|
||||||
case 'qmail':
|
case 'qmail':
|
||||||
$binaryPath = '/var/qmail/bin/sendmail';
|
$binaryPath = '/var/qmail/bin/sendmail';
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -44,7 +44,7 @@ class MailerTest extends TestCase {
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('getSystemValue')
|
->method('getSystemValue')
|
||||||
->with('mail_smtpmode', 'sendmail')
|
->with('mail_smtpmode', 'php')
|
||||||
->will($this->returnValue('sendmail'));
|
->will($this->returnValue('sendmail'));
|
||||||
|
|
||||||
$this->assertEquals(\Swift_SendmailTransport::newInstance('/usr/sbin/sendmail -bs'), self::invokePrivate($this->mailer, 'getSendMailInstance'));
|
$this->assertEquals(\Swift_SendmailTransport::newInstance('/usr/sbin/sendmail -bs'), self::invokePrivate($this->mailer, 'getSendMailInstance'));
|
||||||
|
@ -54,7 +54,7 @@ class MailerTest extends TestCase {
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('getSystemValue')
|
->method('getSystemValue')
|
||||||
->with('mail_smtpmode', 'sendmail')
|
->with('mail_smtpmode', 'php')
|
||||||
->will($this->returnValue('qmail'));
|
->will($this->returnValue('qmail'));
|
||||||
|
|
||||||
$this->assertEquals(\Swift_SendmailTransport::newInstance('/var/qmail/bin/sendmail -bs'), self::invokePrivate($this->mailer, 'getSendMailInstance'));
|
$this->assertEquals(\Swift_SendmailTransport::newInstance('/var/qmail/bin/sendmail -bs'), self::invokePrivate($this->mailer, 'getSendMailInstance'));
|
||||||
|
|
Loading…
Reference in a new issue