I have a SharePoint 2013 environment with FBA configured. I have a Tasks list in a site, which has an Assigned To field. I have created a SPD workflow which will read the email addresses of the users in the Assigned To field and send email to them. This field could have either FBA user or AD user. Now, in my site actions, under People and Groups, I have 2 users, one is an AD user and the other is a Forms user. I have edited both of them and mapped my email address. After publishing and running the workflow, it is not sending emails. I have properly configured the SMTP service and also provided outgoing SMTP details in CA site. Also, the email works fine, if I hard code the user name in the WF itself, but it is not able to pick up from the Assigned To field.
First it is in the Started stage. But, if I check its details (by clicking on the blue icon), it shows the following message.
Retrying last request. Next attempt scheduled in less than one minute. Details of last request:
HTTP BadRequest to http://url/_vti_bin/client.svc/sp.utilities.utility.SendEmail Correlation Id: 52800d29-976a-2c5d-a672-babd1f0fe64e Instance Id: a6edcfcc-7c53-4f94-bb86-d56c41da5e19
Note: The above Correlation Id in ULS shows the following detail
Microsoft.SharePoint.SPException: The e-mail message cannot be sent. Make sure the e-mail has a valid recipient. ---> Microsoft.SharePoint.Client.ClientServiceException: The e-mail message cannot be sent. Make sure the e-mail has a valid recipient. --- End of inner exception stack trace --- at Microsoft.SharePoint.Utilities.SPUtility.SendEmail_Client(EmailProperties properties) at Microsoft.SharePoint.ServerStub.Utilities.SPUtilityServerStub.InvokeStaticMethod(String methodName, ClientValueCollection xmlargs, ProxyContext proxyContext, Boolean& isVoid) at Microsoft.SharePoint.Client.ServerStub.InvokeStaticMethodWithMonitoredScope(String methodName, ClientValueCollection args, ProxyContext proxyContext, Boolean& isVoid) at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.GetObjectFromPathRoot(Boolean mainRequestPath, EdmParserNode node, Boolean resourceEndpoint, MethodInformation& methodInfo) at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.GetObjectFromPath(Boolean mainRequestPath, String path, String pathForErrorMessage) at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.Process() at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.ProcessRequest() at Microsoft.SharePoint.Client.Rest.RestService.ProcessQuery(Stream inputStream, IList`1 pendingDisposableContainer) But the user does have a valid email address mapped.
Upon refreshing the screen further, it is throwing an exception and gets suspended.
Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ArgumentNullException: Value cannot be null. Parameter name: Input at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation).
Also, I am using an App Step in SharePoint designer. I have read that for WFs to work for an FBA user, this is the way to go. Also, I have activated the Workflow can use App Permissions feature at the site level.