Once we configured the SharePoint outbound mail server then our responsible to test the setup. Here the small powershell snippet will do!
1 2 3 4 5 6 7 |
### The script will return True or False $toemail = “sathiya@sathiya.io” $subject = “Test – SharePoint Outbound mail” $body = “This mail for testing purpose…! Please ignore your action!” $site = New-Object Microsoft.SharePoint.SPSite “http://sharepoint/” $web = $site.OpenWeb() [Microsoft.SharePoint.Utilities.SPUtility]::SendEmail($web,0,0,$toemail,$subject,$body) |
If you get “True” the configuration perfectly alright, else you have to check the ULS log to find an issue. Suppose if you are not getting a mail you have to check smtp log or address to exchange/wintel team.