Skip to content
Snippets Groups Projects
Commit d82b1f3f authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

Merge branch 'master' of gitlab.sgalinski.de:typo3/sg_mail into HEAD

parents feb7c6b7 491a72d1
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment