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

EmailServer

Namespace PSWriteHTML

Defines the email server configuration for sending emails.

Remarks

This function sets up the email server configuration including server address, port, authentication credentials, and SSL settings.

Examples

Authored help example

EXAMPLE 1


EmailServer -Server "mail.example.com" -Port 587 -UserName "user@example.com" -Password "P@ssw0rd" -SSL
Configures the email server with the specified server address, port, username, password, and SSL enabled.
        

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

EmailServer [-Password <String>] [-PasswordAsSecure] [-PasswordFromFile] [-Port <Int32>] [-Server <String>] [-SSL] [-UseDefaultCredential] [-UserName <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Password String optionalposition: 3pipeline: False
Specifies the password for authentication with the email server.
PasswordAsSecure SwitchParameter optionalposition: namedpipeline: False
Indicates that the password should be treated as a secure string.
PasswordFromFile SwitchParameter optionalposition: namedpipeline: False
Indicates that the password should be read from a file.
Port Int32 optionalposition: 1pipeline: False
Specifies the port number of the email server. Default is 587.
Server String optionalposition: 0pipeline: False
Specifies the address of the email server.
SSL SwitchParameter optionalposition: namedpipeline: False
Indicates whether SSL should be used for the connection.
UseDefaultCredential SwitchParameter optionalposition: namedpipeline: Falsealiases: UseDefaultCredentials
Specifies whether to use default credentials for authentication.
UserName String optionalposition: 2pipeline: False
Specifies the username for authentication with the email server.