Make EMailer util dynamic
This commit is contained in:
parent
9269221825
commit
ea9d3b7438
4 changed files with 11 additions and 3 deletions
|
@ -610,7 +610,7 @@ function notification($params)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// use the Emailer class to send the message
|
// use the Emailer class to send the message
|
||||||
return Emailer::send([
|
return DI::emailer()->send([
|
||||||
'uid' => $params['uid'],
|
'uid' => $params['uid'],
|
||||||
'fromName' => $sender_name,
|
'fromName' => $sender_name,
|
||||||
'fromEmail' => $sender_email,
|
'fromEmail' => $sender_email,
|
||||||
|
|
|
@ -816,7 +816,7 @@ function item_post(App $a) {
|
||||||
'htmlVersion' => $message,
|
'htmlVersion' => $message,
|
||||||
'textVersion' => HTML::toPlaintext($html.$disclaimer)
|
'textVersion' => HTML::toPlaintext($html.$disclaimer)
|
||||||
];
|
];
|
||||||
Emailer::send($params);
|
DI::emailer()->send($params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -363,4 +363,12 @@ abstract class DI
|
||||||
{
|
{
|
||||||
return self::$dice->create(Util\Profiler::class);
|
return self::$dice->create(Util\Profiler::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Util\Emailer
|
||||||
|
*/
|
||||||
|
public static function emailer()
|
||||||
|
{
|
||||||
|
return self::$dice->create(Util\Emailer::class);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ class Emailer
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function send(array $params)
|
public function send(array $params)
|
||||||
{
|
{
|
||||||
$params['sent'] = false;
|
$params['sent'] = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue