Skip to content

Commit

Permalink
[BUGFIX] Prevent exception for preview mails
Browse files Browse the repository at this point in the history
Because there is no Newsletter Object
  • Loading branch information
einpraegsam committed Feb 5, 2025
1 parent 345f2c1 commit 3e23f11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Mail/SendMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected function setUnsubscribeUrlInHeader(MailMessage $mailMessage): void
$this->newsletter,
$this->user,
$this->configuration->getSiteConfiguration(),
$this->newsletter->getLanguage()
$this->newsletter?->getLanguage() ?? 0
);
$headers = $mailMessage->getHeaders();
$headers->addHeader('List-Unsubscribe', '<' . $unsubscribeUrlService->get() . '>');
Expand Down

0 comments on commit 3e23f11

Please sign in to comment.