diff --git a/lib/Mailer/Mailer.php b/lib/Mailer/Mailer.php index 856d1e4824..0b4c80370a 100644 --- a/lib/Mailer/Mailer.php +++ b/lib/Mailer/Mailer.php @@ -98,13 +98,13 @@ class Mailer { $this->mailerConfig['host'], $this->mailerConfig['port'], $this->mailerConfig['authentication'], - $this->mailerConfig['login'], - $this->mailerConfig['password'], $this->mailerConfig['encryption'], $this->sender, $this->replyTo, $this->returnPath, - new SMTPMapper() + new SMTPMapper(), + $this->mailerConfig['login'], + $this->mailerConfig['password'] ); break; default: diff --git a/lib/Mailer/Methods/SMTP.php b/lib/Mailer/Methods/SMTP.php index babe7af81e..00f6baa996 100644 --- a/lib/Mailer/Methods/SMTP.php +++ b/lib/Mailer/Methods/SMTP.php @@ -35,8 +35,17 @@ class SMTP { private $wp; public function __construct( - $host, $port, $authentication, $login = null, $password = null, $encryption, - $sender, $replyTo, $returnPath, SMTPMapper $errorMapper) { + $host, + $port, + $authentication, + $encryption, + $sender, + $replyTo, + $returnPath, + SMTPMapper $errorMapper, + $login = null, + $password = null + ) { $this->wp = new WPFunctions; $this->host = $host; $this->port = $port; diff --git a/tests/integration/Mailer/Methods/SMTPTest.php b/tests/integration/Mailer/Methods/SMTPTest.php index 2fea2ad5f0..591cb5c1c5 100644 --- a/tests/integration/Mailer/Methods/SMTPTest.php +++ b/tests/integration/Mailer/Methods/SMTPTest.php @@ -51,13 +51,13 @@ class SMTPTest extends \MailPoetTest { $this->settings['host'], $this->settings['port'], $this->settings['authentication'], - $this->settings['login'], - $this->settings['password'], $this->settings['encryption'], $this->sender, $this->replyTo, $this->returnPath, - new SMTPMapper() + new SMTPMapper(), + $this->settings['login'], + $this->settings['password'] ); $this->subscriber = 'Recipient '; $this->newsletter = [ @@ -91,13 +91,13 @@ class SMTPTest extends \MailPoetTest { $this->settings['host'], $this->settings['port'], $this->settings['authentication'], - $this->settings['login'], - $this->settings['password'], $this->settings['encryption'], $this->sender, $this->replyTo, $returnPath = false, - new SMTPMapper() + new SMTPMapper(), + $this->settings['login'], + $this->settings['password'] ); expect($mailer->returnPath)->equals($this->sender['from_email']); }