2

We want to migrate SharePoint 2013 to SharePoint 2016.We installed and configured SharePoint 2016. In part of basic configuration, configured Outgoing mail settings in Central Admin> Settings>. I given Outgoing mail details same as in SharePoint 2013 server. But here it is not working. I found that there additionally need to provide port number in SharePoint 2016 Outgoing mail settings.I tried with 25 port number. But this is also not working.

Thanks in Advance.

Srinivas Dasari.

2 Answers 2

3

There are couple of things to configure for Outgoing email.

  • make sure you enter proper url of the exchange / SMTP server
  • Enter the correct port number (i.e. 25)
  • if you dont configure the TlS 1.2 in your environment then select No for TLS.
  • Make Sure your SharePoint server register properly with Exchange / SMTP relay ( if they not then email will not go out.)
  • From central admin, make sure the timer job related to alerts is working, it should not be disable as well as not throwing an error.
  • Timer service should be running on all server.

you can test couple of things to corner the issue.

  • use command line and try to send the email using the email address which you mentioned in central admin.
  • setup an alert on Document library and check if you get immediate alert then add a new document & wait for 5 min to get the email.
1
  • Thanks Waqas, I tried as you briefed. When I use powershell command using Microsoft.SharePoint.Utilities.SPUtility , result is False. But When I Use .Net SMTP Send Mail Method, result is True and I'm getting Mails.Is any other configuration is needed? Commented Feb 23, 2019 at 7:15
3

There is likely a restriction on the mail server which is preventing you from relaying from your SharePoint servers to your mail server (e.g. they have added specific allowed IPs in a receive connector).

You can test this in two ways:

Send-MailMessage

This will use Windows PowerShell to test email. Make sure to run this on your SharePoint server. Alternatively, you can use the SharePoint Management Shell to run the below which will test email flowing from the SharePoint object model using your Central Admin outgoing email settings.

$email = "[email protected]"
$subject = "Email through SharePoint OM"
$body = "Message body."
$site = $null

if ($site -eq $null)
{
    $site = (Get-SPWebApplication -IncludeCentralAdministration | ?{$_.IsAdministrationWebApplication -eq $true}).Url
}
$site = Get-SPSite $site
$web = $site.OpenWeb()
[Microsoft.SharePoint.Utilities.SPUtility]::SendEmail($web,0,0,$email,$subject,$body)
Write-Host "If the result returns True, the email has been sent to the SMTP server successfully."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.