]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/Emailer.php
Merge pull request #8147 from annando/fetch-post
[friendica.git] / src / Util / Emailer.php
index d7ca234a98da82d7287f344f9bfd4929ba61044d..41835b6609b7abe210cb91836645d71d1df2ee3f 100644 (file)
@@ -4,14 +4,13 @@
  */
 namespace Friendica\Util;
 
-use Friendica\Core\Config;
 use Friendica\Core\Hook;
 use Friendica\Core\Logger;
-use Friendica\Core\PConfig;
+use Friendica\DI;
 use Friendica\Protocol\Email;
 
 /**
- * @brief class to handle emailing
+ * class to handle emailing
  */
 class Emailer
 {
@@ -44,7 +43,7 @@ class Emailer
 
                $email_textonly = false;
                if (!empty($params['uid'])) {
-                       $email_textonly = PConfig::get($params['uid'], "system", "email_textonly");
+                       $email_textonly = DI::pConfig()->get($params['uid'], "system", "email_textonly");
                }
 
                $fromName = Email::encodeHeader(html_entity_decode($params['fromName'], ENT_QUOTES, 'UTF-8'), 'UTF-8');
@@ -81,7 +80,7 @@ class Emailer
                $multipartMessageBody .=
                        "--" . $mimeBoundary . "--\n";                                  // message ending
 
-               if (Config::get("system", "sendmail_params", true)) {
+               if (DI::config()->get("system", "sendmail_params", true)) {
                        $sendmail_params = '-f ' . $params['fromEmail'];
                } else {
                        $sendmail_params = null;