Evotec

Project

PSWriteHTML

PSWriteHTML is an open-source PowerShell project with packages, release history, and working documentation.

Stars 995
Forks 114
Open issues 69
PowerShell Gallery downloads 7,436,513
Release v1.41.0
Language: PowerShell Updated: 2026-04-11

API Reference

Function

EmailBody

Namespace PSWriteHTML

Defines styling properties for an email body content.

Remarks

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

Authored help example

EXAMPLE 1


EmailBody -Alignment 'Value'
        

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.

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 <normal>] [-Format] [-LineHeight <String>] [-Minify] [-Online] [-Parameter <IDictionary>] [-TextDecoration <line-through|overline|underline>] [-TextTransform <uppercase|lowercase|capitalize>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Alignment String optionalposition: namedpipeline: Falsevalues: 4
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 optionalposition: namedpipeline: False
Specifies the background color of the email body.
Color String optionalposition: namedpipeline: False
Specifies the color of the text in the email body.
Direction String optionalposition: namedpipeline: Falsevalues: 1
Specifies the direction of the text in the email body. Valid value is 'rtl'.
Possible values: rtl
EmailBody ScriptBlock optionalposition: 0pipeline: False
Specifies the ScriptBlock containing the email body content.
FontFamily String optionalposition: namedpipeline: False
Specifies the font family of the text in the email body.
FontSize Object optionalposition: namedpipeline: Falsealiases: Size
FontStyle String optionalposition: namedpipeline: Falsevalues: 3
Specifies the style of the font in the email body. Valid values are 'normal', 'italic', or 'oblique'.
Possible values: normal, italic, oblique
FontVariant String optionalposition: namedpipeline: Falsevalues: 2
Specifies the variant of the font in the email body. Valid values are 'normal' or 'small-caps'.
Possible values: normal, small-caps
FontWeight String optionalposition: namedpipeline: Falsevalues: 13
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 optionalposition: namedpipeline: False
Switch parameter to format the email body content.
LineHeight String optionalposition: namedpipeline: False
Specifies the line height of the text in the email body.
Minify SwitchParameter optionalposition: namedpipeline: False
Switch parameter to minify the email body content.
Online SwitchParameter optionalposition: namedpipeline: False
Switch parameter to indicate if the email body content is online.
Parameter IDictionary optionalposition: namedpipeline: False
Specifies additional parameters for styling the email body content.
TextDecoration String optionalposition: namedpipeline: Falsevalues: 3
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 optionalposition: namedpipeline: Falsevalues: 3
Specifies the transformation of the text in the email body. Valid values are 'uppercase', 'lowercase', or 'capitalize'.
Possible values: uppercase, lowercase, capitalize