summaryrefslogtreecommitdiffstats
path: root/settings/controller/mailsettingscontroller.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-02-12 13:53:27 +0100
committerLukas Reschke <lukas@owncloud.com>2015-03-16 12:47:05 +0100
commit13486a5ada62e4355473ca01e07371c162951e84 (patch)
treec079e9c53691ca14e5e1898c40a93322d6e727f5 /settings/controller/mailsettingscontroller.php
parent0d9f149dd93997085b85e2b174f5989a1b996263 (diff)
downloadnextcloud-server-13486a5ada62e4355473ca01e07371c162951e84.tar.gz
nextcloud-server-13486a5ada62e4355473ca01e07371c162951e84.zip
Migrate to SwiftMail
Replaces the OC_Mail and phpmailer with SwiftMail allowing us to mock it properly. Fixes the unit test execution on master on local machines and https://github.com/owncloud/core/issues/12014 Conflicts: 3rdparty lib/private/server.php lib/public/iservercontainer.php tests/lib/mail.php tests/settings/controller/mailsettingscontrollertest.php Conflicts: 3rdparty lib/private/mail.php lib/private/server.php lib/public/iservercontainer.php settings/ajax/lostpassword.php settings/application.php
Diffstat (limited to 'settings/controller/mailsettingscontroller.php')
-rw-r--r--settings/controller/mailsettingscontroller.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/settings/controller/mailsettingscontroller.php b/settings/controller/mailsettingscontroller.php
index 5874e644abb..43715b82237 100644
--- a/settings/controller/mailsettingscontroller.php
+++ b/settings/controller/mailsettingscontroller.php
@@ -16,6 +16,8 @@ use \OCP\AppFramework\Controller;
use OCP\IRequest;
use OCP\IL10N;
use OCP\IConfig;
+use OCP\Mail\IMailer;
+use OCP\Mail\IMessage;
/**
* @package OC\Settings\Controller
@@ -30,8 +32,8 @@ class MailSettingsController extends Controller {
private $userSession;
/** @var \OC_Defaults */
private $defaults;
- /** @var \OC_Mail */
- private $mail;
+ /** @var IMailer */
+ private $mailer;
/** @var string */
private $defaultMailAddress;
@@ -42,7 +44,7 @@ class MailSettingsController extends Controller {
* @param IConfig $config
* @param Session $userSession
* @param \OC_Defaults $defaults
- * @param \OC_Mail $mail
+ * @param IMailer $mailer
* @param string $defaultMailAddress
*/
public function __construct($appName,
@@ -51,14 +53,14 @@ class MailSettingsController extends Controller {
IConfig $config,
Session $userSession,
\OC_Defaults $defaults,
- \OC_Mail $mail,
+ IMailer $mailer,
$defaultMailAddress) {
parent::__construct($appName, $request);
$this->l10n = $l10n;
$this->config = $config;
$this->userSession = $userSession;
$this->defaults = $defaults;
- $this->mail = $mail;
+ $this->mailer = $mailer;
$this->defaultMailAddress = $defaultMailAddress;
}