After installation of SharePoint Server 2016, once you are done with the initial configurations of the Farm, we can configure Outgoing Email Settings.
Outgoing email configuration enables SharePoint users to monitor SharePoint artifacts like Lists & Libraries. In addition, it also allows site Administrators to receive the messages regarding the administrative issues.
In this article, we will see the steps and PowerShell scripts involved in configuring outgoing Email settings in SharePoint 2016 for a specific Web Application.
Launch Central Administration site.
Click Manage Web Applications link under Application Management.
Select the Web Application out of the list of the available Web Applications.
Click General Settings Ribbon Control to select an Outgoing Email.
This launches the Web Application Outgoing Email Settings screen in the Modal Dialog.
From now onwards, we have two choices to configure the Outgoing Email Settings, where the first one is to make the use of SharePoint user interface, as shown above or configure the settings, using PowerShell Script to support automation scenarios.
In this article, we will see the configuration is 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 PowerShell script given below to update the outgoing E-mail settings.
- 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 accepts the parameters given below.
- Finally call the Update method to persist the changes to SharePoint database.
- Launch SharePoint 2016 Management Shell.
- Execute the commands, as mentioned above.
Once the commands are executed successfully, we can go back to SharePoint outgoing email settings to verify if the settings have been updated or not.
If the 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.