Tuesday 25 February 2014

SharePoint 2013 Workflow mail not getting sent


If SharePoint 2013 March and December cumulative updates are not installed. You may face a error of mail not getting sent from Designer. The root cause of it is that SharePoint designer workflow takes from email ID from its WFResourceManagementDB which is Workflow@noreplay. So when the request goes to SMTP to send email from this email address SMTP sends it to BAD Email. To rectify this Update the WFResourceManagementDB with the Email ID from which the mails getting sent. 



UPDATE [WFResourceManagementDB].[Activities]
SET [Xaml].modify('declare namespace ns="http://schemas.microsoft.com/netfx/2009/xaml/activities";
                    declare namespace p="http://schemas.microsoft.com/workflow/2012/07/xaml/activities";
                    declare namespace scg="clr-namespace:System.Collections.Generic;assembly=mscorlib";
                    declare namespace x="http://schemas.microsoft.com/winfx/2006/xaml";
                    replace value of (/ns:Activity/ns:Sequence/p:BuildDynamicValue/scg:Dictionary/ns:InArgument[@x:Key="properties/From"]/text())[1] with "example@mail.com"')
WHERE Name = 'EMail'”

Replace  example@mail.com with the email from will be sent.

If after that also mails not getting sent please make sure that mail are getting sent via SharePoint. You can easily varify that by sending an Email alert from a list.



Note: Make Sure the password for the mail you are using must be set to Never expired. Because mails will stuck to Queue if the password expire. 

Bug Solved: With SharePoint 2013 March and Dec Cumulitive updates.

No comments:

Post a Comment