# EmailBody

Defines styling properties for an email body content.

Project

PSWriteHTML

Generate HTML reports, dashboards, and emails from PowerShell without writing HTML, CSS, or JavaScript.

[View on GitHub](https://github.com/EvotecIT/PSWriteHTML) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteHTML/releases/tag/v1.41.0) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteHTML/1.40.0)

Stars **1,025**

Forks **114**

Open issues 

PowerShell Gallery downloads **7,576,901**

Release **v1.45.0**

Language: PowerShell Updated: 2026-11-19

Command 

**Module**

`PSWriteHTML`

Defines styling properties for an email body content.

## Syntax

```
EmailBody
[-Alignment <left|center|right|justify>]
[-BackGroundColor <String>]
[-Color <String>]
[-Direction <rtl>]
[[-EmailBody] <ScriptBlock>]
[-FontFamily <String>]
[-FontSize <Object>]
[-FontStyle <normal|italic|oblique>]
[-FontVariant <normal|small-caps>]
[-FontWeight <String>]
[-Format]
[-LineHeight <String>]
[-Minify]
[-Online]
[-Parameter <IDictionary>]
[-TextDecoration <line-through|overline|underline>]
[-TextTransform <uppercase|lowercase|capitalize>]
[<CommonParameters>]
```

[#](#method-emailbody-string-string-string-string-scriptblock-string-object-string-string-string-switchparameter-string-switchparameter-switchparameter-idictionary-string-string)

Parameter set: `All Parameter Sets`

## Description

This function defines styling properties for an email body content such as color, background color, font size, font weight, font style, font family, alignment, text decoration, text transform, direction, and more.

## Examples

### Example 1

```powershell
EmailBody -Alignment 'Value'
```

## Parameters

**-Alignment String optional**

Specifies the alignment of the text in the email body. Valid values are 'left', 'center', 'right', or 'justify'.

Possible values: `left`, `center`, `right`, `justify`

**-BackGroundColor String optional**

Specifies the background color of the email body.

**-Color String optional**

Specifies the color of the text in the email body.

**-Direction String optional**

Specifies the direction of the text in the email body. Valid value is 'rtl'.

Possible values: `rtl`

**-EmailBody ScriptBlock optionalposition: 0**

Specifies the ScriptBlock containing the email body content.

**-FontFamily String optional**

Specifies the font family of the text in the email body.

**-FontSize Object optionalaliases: Size**

**-FontStyle String optional**

Specifies the style of the font in the email body. Valid values are 'normal', 'italic', or 'oblique'.

Possible values: `normal`, `italic`, `oblique`

**-FontVariant String optional**

Specifies the variant of the font in the email body. Valid values are 'normal' or 'small-caps'.

Possible values: `normal`, `small-caps`

**-FontWeight String optional**

Specifies the weight of the font in the email body. Valid values are 'normal', 'bold', 'bolder', 'lighter', or numeric values from 100 to 900.

Possible values: `normal`, `bold`, `bolder`, `lighter`, `100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900`

**-Format SwitchParameter optional**

Switch parameter to format the email body content.

**-LineHeight String optional**

Specifies the line height of the text in the email body.

**-Minify SwitchParameter optional**

Switch parameter to minify the email body content.

**-Online SwitchParameter optional**

Switch parameter to indicate if the email body content is online.

**-Parameter IDictionary optional**

Specifies additional parameters for styling the email body content.

**-TextDecoration String optional**

Specifies the decoration of the text in the email body. Valid values are 'none', 'line-through', 'overline', or 'underline'.

Possible values: `line-through`, `overline`, `underline`

**-TextTransform String optional**

Specifies the transformation of the text in the email body. Valid values are 'uppercase', 'lowercase', or 'capitalize'.

Possible values: `uppercase`, `lowercase`, `capitalize`

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:A7DD674B245AC6576E00D327D0893F8138354277F0ADC2C76C97A59AC6D4447D -->
