SharePoint 2016 Administration : Configure Outgoing Email Settings using PowerShell

After installation of SharePoint Server 2016 and done with the initial configurations of the Farm we can configure Outgoing Email Settings.

Outgoing Email configuration enables SharePoint users to monitor the SharePoint artifacts like List & Libraries. Along with that it allows Site Administrators to receive messages regarding Administrative issues.

In this article we will see to the steps and PowerShell Scripts involved in configuring Outgoing Email settings in SharePoint 2016 for a specific Web Application.

Launch “Central Administration Site”

Click on “Manage Web Applications” link under “Application Management”


Select the Web Application out of the list of available Web Applications

Click on “General Settings” Ribbon Control to select “Outgoing Email”


This launches the “Web Application Outgoing Email Settings” screen in the Modal Dialog


Now onwards we have two choices to configure the Outgoing Email Settings, the first one is to make use of the SharePoint User Interface as shown above or configure the settings using PowerShell Script to support automations scenarios.

In this article we see configuration done using PowerShell. Before we execute the corresponding PowerShell Commands, we would visit to the Web Application and see if it is accessible as shown below:


Next step is to execute the following PowerShell Script to update the Outgoing Email Settings:

PowerShell Script

  • Get handle on Web Application to which we want to apply Outgoing Email Settings

$webAppObj = Get-SPWebApplication -Identity http://sp-2016-dev

  • Once we are able to the get the Web Application Object, we will call the “UpdateMailSettings” Methods which accept following Parameters:


$webAppObj.UpdateMailSettings(“”,””,””, 65001)

  • Then finally call the “Update” method to persist the changes to the SharePoint Database



  • Launch SharePoint 2016 Management Shell
  • Execute the commands as mentioned above


Once the commands get executed successfully we can go back to SharePoint Outgoing Email Settings to verify if the settings have been updated.

If execution has been completed without an error we would be looking at the properties saved as shown below:


That is it for this demo.

Hope you find it helpful.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s