Introduce NotifyEmailBuilder

This commit is contained in:
nupplaPhil 2020-02-03 00:07:22 +01:00
parent e37b1c8794
commit 34dce9fd76
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
5 changed files with 244 additions and 104 deletions

View file

@ -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
*