Skip to content

Commit

Permalink
Convert relative URLs in e-mail text and HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
Toflar committed Apr 30, 2024
1 parent 3e61027 commit 9921b21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Gateway/MailerGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Terminal42\NotificationCenterBundle\Gateway;

use Contao\Controller;
use Contao\CoreBundle\Filesystem\Dbafs\UnableToResolveUuidException;
use Contao\CoreBundle\Filesystem\VirtualFilesystem;
use Contao\CoreBundle\Framework\ContaoFramework;
Expand Down Expand Up @@ -191,7 +192,7 @@ private function renderEmailTemplate(Parcel $parcel): string
$template->body = $this->replaceTokensAndInsertTags($parcel, StringUtil::restoreBasicEntities($languageConfig->getString('email_html')));
$template->language = LocaleUtil::formatAsLanguageTag($languageConfig->getString('language'));

return $this->replaceInsertTags($template->parse());
return $this->contaoFramework->getAdapter(Controller::class)->convertRelativeUrls($this->replaceInsertTags($template->parse()));
}

private function addAttachmentsFromTokens(LanguageConfig $languageConfig, Parcel $parcel, EmailStamp $emailStamp): EmailStamp
Expand Down

0 comments on commit 9921b21

Please sign in to comment.