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?
NMGISupportAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

FibertronTechnical ConsultantCommented:
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!
NMGISupportAuthor Commented:
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 ConsultantCommented:
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.
NMGISupportAuthor Commented:
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,

https://support.microsoft.com/en-us/help/4465015/sharepoint-workflows-stop-after-cve-2018-8421-security-update

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
FibertronTechnical ConsultantCommented:
Glad to hear you got it working!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.