Commit 491a72d1 authored by Stefan Galinski's avatar Stefan Galinski 🎮
Browse files

[BUGFIX] Fix some final issues

parent 6d003091
......@@ -253,7 +253,7 @@ class MailController extends ActionController {
$mailTemplateService->setFromAddress('noreply@example.org');
$mailTemplateService->setTemplateName($selectedTemplateKey);
$mailTemplateService->setExtensionKey($selectedExtensionKey);
$mailIsSend = $mailTemplateService->sendEmail($this->settings['mail']['test']['subject'], TRUE);
$mailIsSend = $mailTemplateService->sendEmail(TRUE);
if ($selectedLanguageRight !== $selectedLanguageLeft) {
/** @var \SGalinski\SgMail\Service\MailTemplateService $mailTemplateService */
......@@ -263,7 +263,7 @@ class MailController extends ActionController {
$mailTemplateService->setFromAddress('noreply@example.org');
$mailTemplateService->setTemplateName($selectedTemplateKey);
$mailTemplateService->setExtensionKey($selectedExtensionKey);
$mailIsSend = $mailTemplateService->sendEmail($this->settings['mail']['test']['subject'], TRUE);
$mailIsSend = $mailTemplateService->sendEmail(TRUE);
}
if ($mailIsSend) {
......
......@@ -168,6 +168,7 @@ class MailTemplateService {
* @param string $templatePath
* @param string $description
* @param array $markers
* @param array $subjects
*/
public static function registerTemplate(
$extension, $templateName, $templatePath, $description, array $markers, array $subjects
......@@ -194,15 +195,14 @@ class MailTemplateService {
/**
* Send the Email
*
* @param string $subject
* @param boolean $isPreview
* @return boolean email was sent or added to mail queue successfully?
*/
public function sendEmail($subject = '', $isPreview = FALSE) {
public function sendEmail($isPreview = FALSE) {
/** @var Template $template */
$template = $this->templateRepository->findTemplate(
$template = $this->templateRepository->findOneByTemplate(
$this->extensionKey, $this->templateName, $this->language
)->getFirst();
);
// If there is no template for this language, use the default template
if ($template === NULL) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment