mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-08 21:44:26 +02:00
Introduce NotifyEmailBuilder
This commit is contained in:
parent
e37b1c8794
commit
34dce9fd76
5 changed files with 244 additions and 104 deletions
|
@ -9,9 +9,11 @@ use Friendica\Core\Config\IConfig;
|
|||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig\IPConfig;
|
||||
use Friendica\Model\Notify;
|
||||
use Friendica\Network\HTTPException\InternalServerErrorException;
|
||||
use Friendica\Object\EMail\IEmail;
|
||||
use Friendica\Protocol\Email;
|
||||
use Friendica\Util\EMailer\NotifyMailBuilder;
|
||||
use Friendica\Util\EMailer\SystemMailBuilder;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
|
@ -89,6 +91,21 @@ class Emailer
|
|||
$this->getSiteEmailAddress(), $this->getSiteEmailName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new mail for notifications
|
||||
*
|
||||
* @see Notify
|
||||
*
|
||||
* @param L10n $l10n The chosen language for the new email
|
||||
*
|
||||
* @return NotifyMailBuilder
|
||||
*/
|
||||
public function newNotifyMail(L10n $l10n)
|
||||
{
|
||||
return new NotifyMailBuilder($l10n, $this->baseUrl, $this->config,
|
||||
$this->getSiteEmailAddress(), $this->getSiteEmailName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a multipart/alternative message with Text and HTML versions
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue