Project

General

Profile

Actions

Feature #102362

open

FluidEmail should render (rte) links as absolute by default

Added by Jan Kornblum 8 months ago. Updated 29 days ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
Mailer API
Target version:
-
Start date:
2023-11-10
Due date:
% Done:

0%

Estimated time:
PHP Version:
8.0
Tags:
fluid, email, fluidemail, link, absolute, lib.parseFunc_RTE
Complexity:
Sprint Focus:

Description

Relative links in email make no sense in general. Any links within a `FluidEmail` content should be rendered as absolute links per default. Or else there should be any `TypoScript` configuration option (or mailer class property) be introduced.

Current use case: When using `FluidEmail` with any RTE content, `lib.parseFunc_RTE` need to be modified (or copied) and passed to `f:format.html()` like `{myCustomEmailBody -> f:format.html(parseFuncTSPath: 'lib.parseFunc_RTE_EMAIL')}`. This should be simplified and made more developer friendly.

Actions #1

Updated by Benni Mack 30 days ago

  • Status changed from New to Needs Feedback

Hey Jan,

do you know the option "config.forceAbsoluteUrls = 1" in TypoScript, which solves exactly your usecase? It also spans not just in RTE fields but in all generated link places.

Actions #2

Updated by Jan Kornblum 29 days ago

Hi Benni,

yes, I’ve seen that had been introduced recently :) But that would always set the absolute in general, also for the site itself, not just the emails. Of course you might workaround with any sub typescript templates for the email related pages only, but…

Do relative links in emails make sense at all?

I still believe the origin issue makes sense. But perhaps better add a similar configuration option „ forceAbsoluteUrlsForFluidEmail“ (not typoscript, but TCA or extension configuration or feature toggle), which would also affect „low level“ emails (symfony commands, middlewares etc)…

What do you think?

Actions

Also available in: Atom PDF