]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/Emailer.php
Remove unused dependency
[friendica.git] / src / Util / Emailer.php
index cb59d48397b4ce6d0d9d8d6b6b5c1e00ebae3b88..ed4ea4d87c5606ee0c69297e1df1556384d17284 100644 (file)
@@ -7,10 +7,12 @@ namespace Friendica\Util;
 use Friendica\App;
 use Friendica\Core\Config\IConfig;
 use Friendica\Core\Hook;
+use Friendica\Core\L10n;
 use Friendica\Core\PConfig\IPConfig;
 use Friendica\Network\HTTPException\InternalServerErrorException;
 use Friendica\Object\EMail\IEmail;
 use Friendica\Protocol\Email;
+use Friendica\Util\EMailer\SystemMailBuilder;
 use Psr\Log\LoggerInterface;
 
 /**
@@ -35,6 +37,18 @@ class Emailer
                $this->baseUrl     = $baseURL;
        }
 
+       /**
+        * Creates a new system email
+        *
+        * @param L10n $l10n The chosen language for the new email
+        *
+        * @return SystemMailBuilder
+        */
+       public function newSystemMail(L10n $l10n)
+       {
+               return new SystemMailBuilder($l10n, $this->baseUrl, $this->config);
+       }
+
        /**
         * Send a multipart/alternative message with Text and HTML versions
         *
@@ -45,12 +59,8 @@ class Emailer
         */
        public function send(IEmail $email)
        {
-               $this->logger->warning('start', ['email' => $email]);
-
                Hook::callAll('emailer_send_prepare', $email);
 
-               $this->logger->warning('end', ['email' => $email]);
-
                if (empty($email)) {
                        return true;
                }