Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

New-OfficeEmailWriterOptions

Module
PSWriteOffice
Inputs
None
Outputs
OfficeIMO.Email.EmailWriterOptions

Creates deterministic email writer settings through ordinary PowerShell parameters.

Syntax

New-OfficeEmailWriterOptions
[-AllowLoss]
[-Base64LineLength <Int32>]
[-IncludeBccHeader]
[-MaxNestedMessageDepth <Int32>]
[-MaxOutputBytes <Int64>]
[-UsePreservedRawSource]
[<CommonParameters>]
#
Parameter set: Options

Examples

Preserve the original source when possible and block semantic loss.

$options = New-OfficeEmailWriterOptions -UsePreservedRawSource -ConversionLossPolicy Block
$message | Save-OfficeEmail -Path .\Message.eml -Options $options -PassThru

Parameters

-AllowLoss SwitchParameter optional
Policy applied when the requested format cannot preserve known message semantics.
-Base64LineLength Int32 optional
Maximum encoded characters on one Base64 body line.
-IncludeBccHeader SwitchParameter optional
Write Bcc recipients into the message header.
-MaxNestedMessageDepth Int32 optional
Maximum embedded-message write depth.
-MaxOutputBytes Int64 optional
Maximum serialized artifact size.
-UsePreservedRawSource SwitchParameter optional
Emit an unchanged preserved source instead of regenerating the artifact when possible.

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.