summaryrefslogtreecommitdiffstats
path: root/lib/private/server.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/server.php')
-rw-r--r--lib/private/server.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/server.php b/lib/private/server.php
index 896abf04a40..a3682dea6b3 100644
--- a/lib/private/server.php
+++ b/lib/private/server.php
@@ -11,6 +11,7 @@ use OC\Command\AsyncBus;
use OC\Diagnostics\NullQueryLogger;
use OC\Diagnostics\EventLogger;
use OC\Diagnostics\QueryLogger;
+use OC\Mail\Mailer;
use OC\Security\CertificateManager;
use OC\Files\Node\Root;
use OC\Files\View;
@@ -312,6 +313,9 @@ class Server extends SimpleContainer implements IServerContainer {
$stream
);
});
+ $this->registerService('Mailer', function(Server $c) {
+ return new Mailer($c->getConfig(), new \OC_Defaults());
+ });
}
/**
@@ -713,6 +717,15 @@ class Server extends SimpleContainer implements IServerContainer {
}
/**
+ * Creates a new mailer
+ *
+ * @return \OCP\Mail\IMailer
+ */
+ function getMailer() {
+ return $this->query('Mailer');
+ }
+
+ /**
* Get the webroot
*
* @return string