Today, I am writing about how to test a SMTP Server by sending a Test email using a PowerShell Script in SharePoint 2010, 2013, 2016.
This blog will describe to you how we can identify and confirm that our outgoing configured email on SharePoint Central Admin is working or not.
There are very simple steps to check this. We can check the SMTP Server by using the below script.
- The first line of script will add PowerShell SharePoint Snapin so that the Windows PowerShell can call Sharepoint Commands.
Clear the host and start assignments to avoid the memory leak.
Now, the remaining is the Variable to call and start finality. Here, you can change Email, Subject, Body and SharePoint site as you require.
Once you are ready with the script, press F5 on PowerShell Window. See the below image for more details.