---
title: "Class MailTemplateHelper"
slug: "sdk--stylelabs.m.sdk.models.typedentities.mailtemplatehelper"
abstract: ""
---
# Class MailTemplateHelper

Defines the mail template helper.

## Inheritance

object

MailTemplateHelper

## Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ModelsTypedEntities

## Assembly: Stylelabs.M.Sdk.dll

## Syntax

```csharp
public class MailTemplateHelper
```

## Constructors

### MailTemplateHelper(EntityBase)

Initializes a new instance of the [MailTemplateHelper](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.typedentities.mailtemplatehelper.html) class.

#### Declaration

```csharp
public MailTemplateHelper(EntityBase user)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [EntityBase](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.entitybase.html) | user | The user. |

## Properties

### Name

Gets or sets the template name.

#### Declaration

```csharp
public string Name { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| string |  |

## Methods

### GetBody(CultureInfo)

Gets the body of the mail template.

#### Declaration

```csharp
public string GetBody(CultureInfo culture)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| CultureInfo | culture | The culture. |

#### Returns

| Type | Description |
| --- | --- |
| string | The body of the mail template. |

### GetDescription(CultureInfo)

Gets the description of the mail template.

#### Declaration

```csharp
public string GetDescription(CultureInfo culture)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| CultureInfo | culture | The culture. |

#### Returns

| Type | Description |
| --- | --- |
| string | The description of the mail template. |

### GetSubject(CultureInfo)

Gets the subject of the mail template.

#### Declaration

```csharp
public string GetSubject(CultureInfo culture)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| CultureInfo | culture | The culture. |

#### Returns

| Type | Description |
| --- | --- |
| string | The subject of the mail template. |

### GetTemplateVariables()

Gets the variables.

#### Declaration

```csharp
public IList<TemplateVariable> GetTemplateVariables()
```

#### Returns

| Type | Description |
| --- | --- |
| IList<>[TemplateVariable](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.notifications.templatevariable.html) | The list of variables. |

### LoadTypedMembersAsync()

Loads typed members.

#### Declaration

```csharp
public Task LoadTypedMembersAsync()
```

#### Returns

| Type | Description |
| --- | --- |
| Task | An awaitable . |

### SetBody(CultureInfo, string)

Sets the body of the mail template.

#### Declaration

```csharp
public void SetBody(CultureInfo culture, string body)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| CultureInfo | culture | The culture. |
| string | body | The body of the mail template. |

### SetDescription(CultureInfo, string)

Sets the description of the mail template.

#### Declaration

```csharp
public void SetDescription(CultureInfo culture, string description)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| CultureInfo | culture | The culture. |
| string | description | The description of the mail template. |

### SetSubject(CultureInfo, string)

Sets the subject of the mail template.

#### Declaration

```csharp
public void SetSubject(CultureInfo culture, string subject)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| CultureInfo | culture | The culture. |
| string | subject | The subject of the mail template. |

### SetTemplateVariables(IEnumerable<TemplateVariable>)

Sets the variables.

#### Declaration

```csharp
public void SetTemplateVariables(IEnumerable<TemplateVariable> variables)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| IEnumerable<>[TemplateVariable](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.notifications.templatevariable.html) | variables | The list of variables. |
