SharePoint 2013 no longer sending emails from workflows.

NMGISupport used Ask the Experts™
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.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
FibertronTechnical Consultant

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!


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.
FibertronTechnical Consultant

Here are a few troubleshooting steps to further investigate the issue...from the bottom of this article...

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 = ""
$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.
Got it working. After creating the test email powershell script. I got a thought to update the Workflow to just email on any change, went to go publish the changes and got a list of errors.

Searched the first one,
Type System.CodeDom.CodeBinaryOperatorExpression is not marked as authorized in the application configuration file.

That came back with a Support Microsoft article about an update,

I ran the powershell script referenced in that article and it fixed it, no IIS Reset needed even.
FibertronTechnical Consultant

Glad to hear you got it working!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial