fix: use correct mailer interface for sending mails

This commit is contained in:
Marvin Flock
2025-04-22 19:50:34 +02:00
parent cc2a411480
commit 9f215b9dfa
2 changed files with 7 additions and 7 deletions
@@ -9,7 +9,7 @@ use Joomla\Archive\Zip;
use Joomla\CMS\Application\SiteApplication;
use Joomla\CMS\Factory;
use Joomla\CMS\Log\Log;
use Joomla\CMS\Mail\Mail;
use Joomla\CMS\Mail\MailerFactoryInterface;
use Joomla\Filesystem\File;
use Joomla\CMS\Language\Text;
use Joomla\Filesystem\Folder;
@@ -9920,7 +9920,7 @@ function adminSaveBegegnungSpielplan(): void
abortWithError($db->stderr(true));
}
$rows = $db->loadObjectList();
$mailer = Factory::getContainer()->get(Mail::class);
$mailer = Factory::getContainer()->get(MailerFactoryInterface::class)->createMailer();
foreach ($rows as $row) {
$mailer->sendMail($mailfrom, $fromname, $row->email, $subject, $body);
}
@@ -10251,7 +10251,7 @@ function adminBegegnungSpielplanBestaetigen(): void
abortWithError($db->stderr(true));
}
$rows = $db->loadObjectList();
$mailer = Factory::getContainer()->get(Mail::class);
$mailer = Factory::getContainer()->get(MailerFactoryInterface::class)->createMailer();
foreach ($rows as $row) {
$mailer->sendMail($mailfrom, $fromname, $row->email, $subject, $body);
}
@@ -15653,7 +15653,7 @@ function termineEmailBenachrichtigung($termin_aktion_id, $ueberarbeiten = false)
$body = "<p>Das " . htmlentities_utf8($aktion[$terminaktion->typ]) . " des folgenden Termins wurde " . ($terminaktion->status == 0 ? ($ueberarbeiten ? "in &uuml;berarbeiteter Form akzeptiert" : "akzeptiert") : "abgelehnt") . ".</p>";
}
$body .= "<table>\r\n" . $termin_beschreibung . $termin_moderationsstatus . "</table>\r\n";
$mailer = Factory::getContainer()->get(Mail::class);
$mailer = Factory::getContainer()->get(MailerFactoryInterface::class)->createMailer();
foreach ($benachrichtigung_emails as $email)
$mailer->sendMail($from, $fromName, $email, $subject, $body, $mode, $cc, $bcc, $attachment, $replyTo, $replyToName);
@@ -10,7 +10,7 @@ use Joomla\CMS\Application\SiteApplication;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Log\Log;
use Joomla\CMS\Mail\Mail;
use Joomla\CMS\Mail\MailerFactoryInterface;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Version;
@@ -4547,7 +4547,7 @@ function begegnungVerlegen(): void
abortWithError($db->stderr(true));
}
$rows = $db->loadObjectList();
$mailer = Factory::getContainer()->get(Mail::class);
$mailer = Factory::getContainer()->get(MailerFactoryInterface::class)->createMailer();
foreach ($rows as $row) {
$mailer->sendMail($mailfrom, $fromname, $row->email, $subject, $body);
}
@@ -4696,7 +4696,7 @@ function begegnungVerlegen(): void
abortWithError($db->stderr(true));
}
$rows = $db->loadObjectList();
$mailer = Factory::getContainer()->get(Mail::class);
$mailer = Factory::getContainer()->get(MailerFactoryInterface::class)->createMailer();
foreach ($rows as $row) {
$mailer->sendMail($mailfrom, $fromname, $row->email, $subject, $body);
}