mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-09 05:04:28 +02:00
Extract System emails from enotify
- Removed every SYSTEM_EMAIL occurrence in enotify - Introduced a "SystemMailBuilder" for build system emails - Replaced every SYSTEM_EMAIL usage in the classes with calling this builder - Added tests for this new Builder - Split the email templates between "base" template for email and concrete usages for different use cases
This commit is contained in:
parent
74490d6594
commit
3291728059
18 changed files with 647 additions and 118 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue