mirror of
https://github.com/Deutscher-Tischfussballbund/com_sportsmanager.git
synced 2026-06-10 06:27:52 +00:00
Änderungen gecheckt, Absender in joomlamail hinzugefügt.
This commit is contained in:
@@ -99,7 +99,7 @@ function renderTemplate($template, $vars = []): string
|
|||||||
$template
|
$template
|
||||||
);
|
);
|
||||||
|
|
||||||
// 3. Einzelne Variablen ersetzen
|
// 3. Einzelne Variablen ersetzen (muss immer am Ende bleiben!!!)
|
||||||
return preg_replace_callback(
|
return preg_replace_callback(
|
||||||
'/\{([A-Z0-9_]+)\}/i',
|
'/\{([A-Z0-9_]+)\}/i',
|
||||||
function($m) use ($vars) {
|
function($m) use ($vars) {
|
||||||
@@ -6143,6 +6143,7 @@ function adminEditSaison(): void
|
|||||||
|
|
||||||
function adminOrdnungsstrafeMailen(): void
|
function adminOrdnungsstrafeMailen(): void
|
||||||
{
|
{
|
||||||
|
|
||||||
$db = getDatabase();
|
$db = getDatabase();
|
||||||
$jInput = Factory::getContainer()->get(SiteApplication::class)->input;
|
$jInput = Factory::getContainer()->get(SiteApplication::class)->input;
|
||||||
$id = $jInput->get('id', 0, 'INT');
|
$id = $jInput->get('id', 0, 'INT');
|
||||||
@@ -6237,8 +6238,12 @@ function sendJoomlaMail(): void
|
|||||||
$subject = $db->escape(trim($jInput->get('betreff', '', 'RAW')));
|
$subject = $db->escape(trim($jInput->get('betreff', '', 'RAW')));
|
||||||
$body = nl2br(trim($jInput->get('nachricht', '', 'RAW')));
|
$body = nl2br(trim($jInput->get('nachricht', '', 'RAW')));
|
||||||
|
|
||||||
|
$user_id = isExternalDatabase() ? 0 : (isJson() ? getUserID() : Factory::getContainer()->get(SiteApplication::class)->getIdentity()->id);
|
||||||
|
$query = "SELECT name, email FROM #__users WHERE id = '$user_id';";
|
||||||
|
$absender = loadObjectList($db, $query);
|
||||||
|
|
||||||
// Joomla From-Adresse aus Konfiguration
|
// Joomla From-Adresse aus Konfiguration
|
||||||
$fromName = 'STFV';
|
$fromName = $absender[0]->name;
|
||||||
$fromEmail = $app->getCfg('mailfrom');
|
$fromEmail = $app->getCfg('mailfrom');
|
||||||
|
|
||||||
// Mailer erstellen über FactoryInterface
|
// Mailer erstellen über FactoryInterface
|
||||||
@@ -6272,7 +6277,10 @@ function sendJoomlaMail(): void
|
|||||||
$mailer->addBcc($recipient);
|
$mailer->addBcc($recipient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Checkmail für Absender
|
||||||
|
$mailer->addBcc($absender[0]->email);
|
||||||
|
|
||||||
// Betreff und Body
|
// Betreff und Body
|
||||||
$mailer->setSubject($subject);
|
$mailer->setSubject($subject);
|
||||||
$mailer->setBody($body);
|
$mailer->setBody($body);
|
||||||
|
|||||||
Reference in New Issue
Block a user