aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Mail/IMailer.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/Mail/IMailer.php')
-rw-r--r--lib/public/Mail/IMailer.php33
1 files changed, 6 insertions, 27 deletions
diff --git a/lib/public/Mail/IMailer.php b/lib/public/Mail/IMailer.php
index 325abd9301e..277f7863184 100644
--- a/lib/public/Mail/IMailer.php
+++ b/lib/public/Mail/IMailer.php
@@ -1,29 +1,10 @@
<?php
declare(strict_types=1);
-
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Joas Schilling <coding@schilljs.com>
- * @author Lukas Reschke <lukas@statuscode.ch>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OCP\Mail;
@@ -33,7 +14,7 @@ namespace OCP\Mail;
*
* Example usage:
*
- * $mailer = \OC::$server->getMailer();
+ * $mailer = \OCP\Server::get(\OCP\Mail\IMailer::class);
* $message = $mailer->createMessage();
* $message->setSubject('Your Subject');
* $message->setFrom(['cloud@domain.org' => 'Nextcloud Notifier']);
@@ -88,16 +69,14 @@ interface IMailer {
*
* @param IMessage $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
+ * 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.)
+ * has been supplied.)
* @since 8.1.0
*/
public function send(IMessage $message): array;
/**
- * Checks if an e-mail address is valid
- *
* @param string $email Email address to be validated
* @return bool True if the mail address is valid, false otherwise
* @since 8.1.0