---
title: Details about the sending of a message
slug: campaign/docs/details-about-the-sending-of-a-message
docTags: 
createdAt: 2026-07-20T15:44:18.284Z
---

This topic describes how to process mailing details using field functions.

:::hint{type="info"}
**Note**

Use your specific data and recipient list fields, and test the field functions before using them in a mailing.
:::

## Displaying an email's dispatch date

To display an e-mail's dispatch date as formatted text, you can use the following Velocity code:

```velocity
#if($user.data.bmIsOnlineVersion)$DateTimeHelper.formatDate('dd.MM.yyyy', $m2u.created)#else$DateTimeHelper.formatDate('dd.MM.yyyy', $DateTimeHelper.getCurrentDate().getTime())#end
```

:::hint{type="info"}
**Tip**

The dispatch date refers to the time when the online version of the email (`bmIsOnlineVersion`) is created. This is most important for [transactional mails](docId:6JbMqxBf1Te6K0YPlNSxo), where the actual dispatch of the email only starts as soon as a trigger (such as *generated post-click*) is fired or an event (such as anniversary) occurs.
:::

### Processing the dispatch date

To display the dispatch date plus a defined time period as formatted text, you can use the following Velocity code:

```velocity
#set($daysToAdd = 50)#if($user.data.bmIsOnlineVersion)$DateTimeHelper.formatDate('dd.MM.yyyy', $DateTimeHelper.addDays($m2u.created, $daysToAdd))#else$DateTimeHelper.formatDate('dd.MM.yyyy', $DateTimeHelper.addDays($DateTimeHelper.getCurrentDate().getTime(), $daysToAdd))#end
```

:::hint{type="info"}
**Tip**

The Velocity code adds 50 days to the dispatch date. This is useful, for example, to indicate the validity of promotional offers.
:::

## Displaying the sender's address

To display the email's sender's address, you can use the following Velocity code:

```velocity
$mailing.mailingConfig.messageConfig.header.from.email.render(null)
```

## Displaying the recipient list name

To display the recipient list name, you can use the following Velocity code:

```velocity
$user.data.userlist.name
```

To use the recipient list name in a URL, you must encode it first:

```velocity
$NetHelper.urlEncode($user.data.userlist.name)
```

## Displaying the recipient list ID

To display the recipient list ID, you can use the following Velocity code:

```velocity
$user.data.userlist.id
```

## Displaying the recipient ID

To display the recipient ID, you can use the following Velocity code:

```velocity
$user.data.id
```

## Displaying the client ID

To display the client ID, you can use the following Velocity code:

```velocity
$mailing.mailingGroup.id
```

## Displaying the client name

To display the client name, you can use the following Velocity code:

```velocity
$mailing.mailingGroup.name
```

## Displaying the mailing name

To display the mailing name, you can use the following Velocity code:

```velocity
$mailing.name
```

## Displaying the mailing description

To display the mailing description, you can use the following Velocity code:

```velocity
#if (!$StringHelper.isEmpty($mailing.description))$NetHelper.urlEncode($mailing.description)#else$!{null}unknown#end
```

:::hint{type="info"}
**Tip**

The mailing description is displayed URL-encoded, for example *This+is+a+test+mailing*. If no description is available, *unknown* is displayed.
:::

## Comparing recipients with target groups

To check whether a recipient belongs to a certain target group and display a corresponding text, you can use the following Velocity code:

```velocity
#if($filter.filterByRevisionedFilters("TARGETGROUPID", false))Foo#else$!{null}Bar#end
```

:::hint{type="info"}
**Tip**

In the Velocity code, *Foo* is the output if the recipient belongs to the target group and *Bar* is the output if the recipient does not belong to the target group.
:::

## Displaying the image host

To display the host of the file server where an image is stored, you can use the following ODR code:

```html
<odr:set value="%{imageHost(m2u)}" var="host"/><odr:out value="%{host}"/>
```

Yo can also display the image host using the following Velocity code:

```velocity
$!bmOdr.out("%{imageHost(m2u)}")$!{null}
```
