Link to home
Create AccountLog in
Avatar of NMGISupport
NMGISupportFlag for United States of America

asked on

SharePoint 2013 no longer sending emails from workflows.

Sharepoint 2013 Workflows not sending emails.

We have a free Sharepoint 2013 install that has 2010 workflows configured that stopped sending emails for approvals.

We can manually approve the request but they are not getting emails and we are not even seeing the emails hit the Exchange server. We have a sub-site with the same type of workflow that is working just fine.

Thoughts?
Avatar of Fibertron
Fibertron
Flag of United States of America image

Once upon a time I had a similar setup and the Exchange relay that we were using for Sharepoint stopped relaying messages.  All the services on the Sharepoint server looked good and I could not find a trace of the missing messages anywhere.  I found out that the Exchange relay had anti-spam filtering enabled and at some point the connector decided to drop messages from Sharepoint.  I am not sure this is the same issue that you are experiencing but I thought I would share my solution.  

Below is a Powershell command that can be modified to enable the bypassing of the anti-spam filter for a specific Exchange relay connector.

Get-ReceiveConnector "My Receive Connector" | Add-ADPermission -User "NT Authority\Anonymous Logon" -AccessRights ExtendedRight -ExtendedRights ms-exch-bypass-anti-spam


Disclamier- bypassing the anti-spam filter should only be done for internal devices that are relaying through specific relay connectors.  DO NOT DISABLE the anti-spam filter on any default connectors!

Hope that helps!
Avatar of NMGISupport

ASKER

That was helpful to know, but did not resolve the problem.

Does anyone know where I can view the logs for sent emails for Workflows?

I really don't have any idea where to even start troubleshooting this as I can't find logs for the failed or even attempted email from the workflow.
Here are a few troubleshooting steps to further investigate the issue...from the bottom of this article...

https://support.office.com/en-us/article/send-e-mail-in-a-workflow-11d5f9dd-955f-412c-b70f-cde4214204f4

Ensure outgoing email settings are set to the correct Exchange server.

Send an email to the same person using the SendEmail function of the SPUtility class with SharePoint Management Shell following the steps below.

Open SharePoint Management Shell as an administrator. (Right click SharePoint Management Shell > Run as administrator)

Run the following script. If the script responds with True and the user receives an email from SharePoint, SMTP is configured correctly in SharePoint.

$Site = "Your Site Name"
$Email = "User to whom you are sending an email through the workflow"
$Subject = "Subject Line with the email"
$Body = "Test Email Body"
$web = Get-SPWeb $Site
[Microsoft.SharePoint.Utilities.SPUtility]::SendEmail($Web ,0,0,$Email,$Subject,$Body)

# Below is the same script with sample data              
$Site = "http://sp/"
$Email = "User1@contoso.com"
$Subject = "Test Email from SharePoint"
$Body = "This is a Test Email"
$web = Get-SPWeb $Site
[Microsoft.SharePoint.Utilities.SPUtility]::SendEmail($Web ,0,0,$Email,$Subject,$Body)

Note: By default, SharePoint does not create log entries for outgoing mails. SharePoint never sends email directly. The email messages are relayed through the SMTP (Exchange) server configured in Central Administration. Follow the steps above for troubleshooting this type of workflow.
ASKER CERTIFIED SOLUTION
Avatar of NMGISupport
NMGISupport
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Glad to hear you got it working!