summaryrefslogtreecommitdiffstats
path: root/lib/private/Mail/Mailer.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-09-15 10:55:27 +0200
committerJoas Schilling <coding@schilljs.com>2017-10-18 15:12:03 +0200
commitc9af36a9ab05e808df526a2054c30364ee02241c (patch)
tree39c49dd14c53467c64685e6a154971997afa1d20 /lib/private/Mail/Mailer.php
parent8b37fe7f6534ad16bd9a357036e95e748e2068e3 (diff)
downloadnextcloud-server-c9af36a9ab05e808df526a2054c30364ee02241c.tar.gz
nextcloud-server-c9af36a9ab05e808df526a2054c30364ee02241c.zip
Introduce a public interface for Message
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Mail/Mailer.php')
-rw-r--r--lib/private/Mail/Mailer.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php
index 45405157d26..43fdb07b810 100644
--- a/lib/private/Mail/Mailer.php
+++ b/lib/private/Mail/Mailer.php
@@ -29,6 +29,7 @@ use OCP\IURLGenerator;
use OCP\Mail\IEMailTemplate;
use OCP\Mail\IMailer;
use OCP\ILogger;
+use OCP\Mail\IMessage;
/**
* Class Mailer provides some basic functions to create a mail message that can be used in combination with
@@ -84,7 +85,7 @@ class Mailer implements IMailer {
/**
* Creates a new message object that can be passed to send()
*
- * @return Message
+ * @return IMessage
*/
public function createMessage() {
return new Message(new \Swift_Message());
@@ -124,13 +125,13 @@ class Mailer implements IMailer {
* Send the specified message. Also sets the from address to the value defined in config.php
* if no-one has been passed.
*
- * @param Message $message Message to send
+ * @param IMessage|Message $message Message to send
* @return string[] Array with failed recipients. Be aware that this depends on the used mail backend and
* therefore should be considered
* @throws \Exception In case it was not possible to send the message. (for example if an invalid mail address
* has been supplied.)
*/
- public function send(Message $message) {
+ public function send(IMessage $message) {
$debugMode = $this->config->getSystemValue('mail_smtpdebug', false);
if (empty($message->getFrom())) {