---
title: "ViewHelpers"
manual: "Mail system"
version: "4.3"
permalink: "https://docs.typo3.org/permalink/mediaessenz/mail:view-helpers@4.3"
source: "Reference/ViewHelpers/Index.rst"
rendered: "2026-11-05T22:41:23+00:00"
---

# ViewHelpers {#view-helpers}

-   [PreviewLinksViewHelper](https://docs.typo3.org/permalink/mediaessenz/mail:previewlinksviewhelper@4.3)
-   [GetBodyContentViewHelper](https://docs.typo3.org/permalink/mediaessenz/mail:getbodycontentviewhelper@4.3)
-   [RemoveMailBoundariesViewHelper](https://docs.typo3.org/permalink/mediaessenz/mail:removemailboundariesviewhelper@4.3)
-   [EmogrifyViewHelper](https://docs.typo3.org/permalink/mediaessenz/mail:emogrifyviewhelper@4.3)
-   [ConstantViewHelper](https://docs.typo3.org/permalink/mediaessenz/mail:constantviewhelper@4.3)

## PreviewLinksViewHelper {#previewlinksviewhelper}

### Usage: {#usage}

```html
<f:variable name="previewLinks" value="{mail:previewLinks(uid:uid,pageId:pageId)}"/>
```

### Parameters: {#parameters}

#### uid: {#uid}

Uid of the mail page

#### pageId: {#pageid}

Page id of the mail-sys-folder containing the mail configuration `mod.web_modules.mail.sendOptions`.

### Returns: {#returns}

Preview-links, title, languageUid and flag-icon-identifiers for every language and type (plain/html), grouped by types.
The types (plain and/or html) will be taken from the Page TSconfig parameter `mod.web_modules.mail.sendOptions`
from the given `pageId`, defined with e.g. the [mail configuration module under "Mail format (default)"](https://docs.typo3.org/permalink/mediaessenz/mail:configure-default-settings@4.3).

## GetBodyContentViewHelper {#getbodycontentviewhelper}

Extract the body tag content of the mail html content. Used to embed the mail html content.

### Usage: {#usage-1}

```html
{mail.htmlContent -> mail:getBodyContent()}
```

## RemoveMailBoundariesViewHelper {#removemailboundariesviewhelper}

Remove the mail boundaries from the mail plain content. Used to embed the mail plain text content.

### Usage: {#usage-2}

```html
{mail.plainContent -> mail:removeMailBoundaries()}
```

## EmogrifyViewHelper {#view-helpers-emogrify}

Writes the rules of a CSS as inline styles into the given HTML and can remove the class attributes afterwards. It does
the same as the content object [EMOGRIFIER](https://docs.typo3.org/permalink/mediaessenz/mail:content-object-emogrifier@4.3), but inside of a Fluid template.

### Usage: {#usage-3}

```html
<html xmlns:mail="http://typo3.org/ns/MEDIAESSENZ/Mail/ViewHelpers" data-namespace-typo3-fluid="true">

<mail:emogrify css="{css}" removeClassAttributes="1" smartClassRemoval="1">
    <div class="body"><a href="https://example.org/">Link</a></div>
</mail:emogrify>
```

### Parameters: {#parameters-1}

#### css: {#css}

The CSS as string. Style blocks which are part of the HTML are inlined as well. Default: empty string

<!-- TODO: no Markdown rendering for "versionchanged" -->

The argument has the default value ''. Before, it was null if it was omitted.

#### extractContent: {#extractcontent}

Return only the content between the body tags. The head and with it the style block with the rules which could not be
inlined are dropped then. Default: `false`

#### options: {#options}

Options of the CSS inliner as array, see [options](https://docs.typo3.org/permalink/mediaessenz/mail:ts-emogrifier-options@4.3) of the content object.

#### removeClassAttributes: {#removeclassattributes}

Remove the class attributes after the CSS has been inlined. Default: `false`

<!-- TODO: no Markdown rendering for "versionadded" -->

#### keepOnTags: {#keepontags}

Comma separated list of tag names (e.g. `table, td`), whose class attribute is kept. Only used together with
`removeClassAttributes`. Default: empty string

<!-- TODO: no Markdown rendering for "versionadded" -->

#### keepClasses: {#keepclasses}

Comma separated list of class names (e.g. `body, btn`), which are kept on all other elements. Only used together
with `removeClassAttributes`. Default: empty string

<!-- TODO: no Markdown rendering for "versionadded" -->

#### smartClassRemoval: {#smartclassremoval}

Keep the classes which are still needed by CSS rules that could not be inlined, e.g. `body` for the rule
`.body a:hover`. Only used together with `removeClassAttributes`. Do not combine it with
`extractContent`, because the style block with these rules is dropped then. Default: `false`

<!-- TODO: no Markdown rendering for "versionadded" -->

### Returns: {#returns-1}

The HTML with inline styles. The output is not escaped.

See [Removing class attributes](https://docs.typo3.org/permalink/mediaessenz/mail:content-object-emogrifier-classes@4.3) for details and an example.

## ConstantViewHelper {#constantviewhelper}

### Usage: {#usage-4}

```html
   <f:variable name="contentSelectionBoundary" value="{mail:constant(name:'CONTENT_SECTION_BOUNDARY')}"/>
<!--{contentSelectionBoundary}_-->Content for all<!--{contentSelectionBoundary}_END-->
<!--{contentSelectionBoundary}_1-->content for category 1<!--{contentSelectionBoundary}_END-->
<!--{contentSelectionBoundary}_1,2,3-->content for category 1, 2 and 3<!--{contentSelectionBoundary}_END-->
```

### Parameters: {#parameters-2}

#### name: {#name}

Name of the constant

#### classFQN: {#classfqn}

Full qualified name of the class containing the constants. Default: `MEDIAESSENZ\Mail\Constants`

### Returns: {#returns-2}

The value of the constant if exists, otherwise null.
