You are currently viewing SharePoint 2016 Outgoing Email Issue

SharePoint 2016 Outgoing Email Issue

I was trying to configure SharePoint 2016 alerts on document library.  Connection to Exchange server was fine. I tested via telnet. I suspected that mail was not going out of SharePoint server. I ran the following script to find out:

http://jeffreypaarhuis.com/2013/02/12/send-test-email-from-sharepoint/

Run the following code with SharePoint Management Shell
1
2
3
4
5
6
7
8
9
$email = “test@test.com”
$subject = “Test subject”
$body = “Test body”
$site = New-Object Microsoft.SharePoint.SPSite “http://sharepoint
$web = $site.OpenWeb()
[Microsoft.SharePoint.Utilities.SPUtility]::SendEmail($web,0,0,$email,$subject,$body)
// A True or False will confirm the message has been sent or not

Result: which means email was not going out.

Two errors registered in the events log:

(1)
Log Name:      Application
Source:        Microsoft-SharePoint Products-SharePoint Foundation
Event ID:      8311
Task Category: Topology
Level:         Error
Keywords:
User:          CONTOSOspinstall
Computer:      CONTOSO-SP1.contoso.com
Description:
An operation failed because the following certificate has validation errors:

Subject Name: CN=CONTOSO-EXCH
Issuer Name: CN=CONTOSO-EXCH
Thumbprint: F87558CA134A70981125CDF23FDF1A722D06D8A3

Errors:

SSL policy errors have been encountered.  Error code ‘0x2‘.

(2)
Log Name:      Application
Source:        Microsoft-SharePoint Products-SharePoint Foundation
Event ID:      7946
Task Category: E-Mail
Level:         Error
Keywords:
User:          CONTOSOspinstall
Computer:      CONTOSO-SP1.contoso.com
Description:
Cannot complete this action.

Please try again.

Solution:
I had configure outbound SMTP server with exchange IP. I modified it to use Exchange server’s NetBios name: CONTOSO-EXCH
Go to Central Administration->System Settings->Configure Outgoing Email Settings-> Outbound SMTP Server – CONTOSO-EXCH

Outbound mails on SharePoint started to flow.