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;
/**
$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
*
*/
public function send(IEmail $email)
{
- $this->logger->debug('start emailing', ['email' => $email]);
-
Hook::callAll('emailer_send_prepare', $email);
- $this->logger->debug('End Hook call', ['email' => $email]);
-
if (empty($email)) {
return true;
}