Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Classes/Domain/Service/Mail/SendMailService.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ protected function createEmailBody(array $email): string

/** @var SendMailServiceCreateEmailBodyEvent $event */
$event = $this->eventDispatcher->dispatch(
new SendMailServiceCreateEmailBodyEvent($standaloneView, $email, $this)
new SendMailServiceCreateEmailBodyEvent($standaloneView, $email, $this, $this->request)
);
$body = $event->getStandaloneView()->render();
$this->mail->setBody($body);
Expand Down
17 changes: 15 additions & 2 deletions Classes/Events/SendMailServiceCreateEmailBodyEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@
namespace In2code\Powermail\Events;

use In2code\Powermail\Domain\Service\Mail\SendMailService;
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Fluid\View\StandaloneView;

final class SendMailServiceCreateEmailBodyEvent
{
public function __construct(protected StandaloneView $standaloneView, protected array $email, protected SendMailService $sendMailService)
{
public function __construct(
protected StandaloneView $standaloneView,
protected array $email,
protected SendMailService $sendMailService,
private ?ServerRequestInterface $request = null
) {
}

public function getStandaloneView(): StandaloneView
Expand Down Expand Up @@ -38,4 +43,12 @@ public function getSendMailService(): SendMailService
{
return $this->sendMailService;
}

/**
* @return ServerRequestInterface|null
*/
public function getRequest(): ?ServerRequestInterface
{
return $this->request;
}
}
1 change: 1 addition & 0 deletions Classes/Update/PowermailTextNullUpdateWizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use TYPO3\CMS\Install\Attribute\UpgradeWizard;
use TYPO3\CMS\Install\Updates\DatabaseUpdatedPrerequisite;
use TYPO3\CMS\Install\Updates\UpgradeWizardInterface;

/**
* If there are any TEXT legacy fields in the database, that have a NULL value
* update them with an empty string.
Expand Down
Loading