For debug purposes, you can do a few things.
First is to use the Send-MailMessage
cmdlet. This is an alternative to using telnet
to test SMTP functionality. If neither of these work, I would take a look at the SMTP server logs. Those logs may show that the SMTP server is dropping the mail due to access permissions (perhaps scoped IP range on a receive connector) or dropping mail if it requires authentication (SharePoint 2010/2013 can only send anonymous mail over tcp/25). You could also look at the SharePoint server, perhaps it has host-based A/V that blocks outgoing tcp/25. Make sure that nlsookup
and tracert
show the correct information from the SharePoint server to your SMTP server hostname. And of course, there could be a firewall issue, inbound on the SMTP server or outbound on the SharePoint server.
If Send-MailMessage
does work, you can try sending email from SharePoint using PowerShell:
$email = "alias@company.com"
$subject = "Email through SharePoint OM"
$body = "Message body."
$site = New-Object Microsoft.SharePoint.SPSite "http://siteUrl"
$web = $site.OpenWeb()
[Microsoft.SharePoint.Utilities.SPUtility]::SendEmail($web,0,0,$email,$subject,$body)
While you're running this, use ulsviewer to monitor the ULS logs on the SharePoint server and filter to the "E-Mail" category. This should give you information on not only what SharePoint is attempting to connect to, but any potential errors it is encountering.