locked
"Send an Email" workflow action not working in SharePoint 2013 RRS feed

  • Question

  • Hi,

    I couldn't manage to get "send an email" action working in a custom list workflow developed in SP Designer 2013. All workflow actions except this one are functioning normally.

    Working environment and error details can be seen below:

    1) Environment Details:

    - SharePoint 2013 Enterprise (March public and April cumulative updates are installed and configured)
    - Workflow Client 1.0 installed
    - Workflow Manager 1.0 and its cumulative update -> Installed
    - Service Bus 1.0 and its cumulative update -> Installed

    2) Error Details:

    When I open workflow status page of the newly triggered list workflow and click info button next to "Started" statement, this message shows up:

    Activity in progress Retrying last request. Next attempt scheduled in less than one minute. Details of last request:

    HTTP InternalServerError to http://akusp01t:3333/sites/WF/_vti_bin/client.svc/

    sp.utilities.utility.SendEmail

    Correlation Id: 8ca5eb7f-4b4b-3476-98a9-8ad9c8214c4d

    Instance Id: 7f50c7bd-a2d4-4747-a2f2-95fbc0eb2d71

    After refreshing page, Internal Status gets changed to "Suspended" and info message now shows:

    RequestorId: 8ca5eb7f-4b4b-3476-0000-000000000000. Details:

    RequestorId: 8ca5eb7f-4b4b-3476-0000-000000000000.

    Details: An unhandled exception occurred during the execution of the workflow instance.

    Exception details: System.ApplicationException: HTTP 500 {"Transfer-Encoding":["chunked"],

    "X-SharePointHealthScore":["0"],"SPClientServiceRequestDuration":["10"],"SPRequestGuid":

    ["8ca5eb7f-4b4b-3476-8d57-f568f6bb85df"],"request-id":["8ca5eb7f-4b4b-3476-8d57-f568f6bb85df"],

    "X-FRAME-OPTIONS":["SAMEORIGIN"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1;

    RequireReadOnly"],"MicrosoftSharePointTeamServices":["15.0.0.4505"],"Cache-Control":

    ["max-age=0, private"],"Date":["Thu, 16 May 2013 12:17:33 GMT"],"X-AspNet-Version":

    ["4.0.30319"],"X-Powered-By":["ASP.NET"]} 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)

    To sum up, it gives an HTTP 500 error.

    When I browse to <comp. name>\Sites\SharePoint - 80\_vti_bin directory in IIS Manager and browse to Client.svc, browser gives HTTP 404-Not Found . All other web services here that I've tried gave proper responses.

    When I check 15/LOGS, error message displays:

    SharePoint Foundation CSOM ahjq1 High Exception occured in scope Microsoft.SharePoint.Utilities.SPUtility.SendEmail.

    Exception=System.Configuration.ConfigurationErrorsException: Exception of type

    'System.Configuration.ConfigurationErrorsException' was thrown.

    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)
    8ca5eb7f-4b4b-3476-a4ef-72fa76dd3e64

    I have tried every possible solution or workaround tactics I could imagine, but to no avail.

    EDIT: Alert Me and PowerShell mechanisms are successfully sending emails.

    Please help me out.

    Thanks in advance,

    Can



    • Edited by Can Kocak Thursday, May 16, 2013 1:15 PM
    Thursday, May 16, 2013 12:48 PM

Answers

  • Hi Philip,

    My problem was solved through a configuration in Microsoft Exchange, which was adding the SharePoint server's IP address to the allowed machines list (permission to send mails).

    In your case, choosing Workflow:Initiator -> ''Login Name'' will solve the problem because ''To'' field in send email action only accepts SP user accounts as valid input.

    • Marked as answer by Can Kocak Saturday, June 1, 2013 6:23 PM
    Saturday, June 1, 2013 6:23 PM
  • Can,

    The proposed answer is adding the SharePoint server to mail relay. If you have relay in the company the relay should accept the incoming request, to do a quick test, you can google for sample smtp test script , if the script can send email then its good if not you need to add SharePoint server IP to relay.

    • Marked as answer by Can Kocak Monday, August 26, 2013 1:17 PM
    Wednesday, August 7, 2013 5:09 PM

All replies

  • I have exactly the same problem!

    I have been working on it for some days, still no way...

    Thursday, May 16, 2013 12:54 PM
  • Are you trying to email the Workflow Context:Initiator ??  I have a problem with sending an email to this because I discovered that the return values for Display Name and Email address from the Initiator are both blank.  Don't know why.  I'm in O365.
    Friday, May 31, 2013 11:34 PM
  • Hi Philip,

    My problem was solved through a configuration in Microsoft Exchange, which was adding the SharePoint server's IP address to the allowed machines list (permission to send mails).

    In your case, choosing Workflow:Initiator -> ''Login Name'' will solve the problem because ''To'' field in send email action only accepts SP user accounts as valid input.

    • Marked as answer by Can Kocak Saturday, June 1, 2013 6:23 PM
    Saturday, June 1, 2013 6:23 PM
  • May I know how to add sharepoint server ip address to exchange online? And how to find my sharePoint Online Server IP (I'm Office 365 user)

    Thanks in advance.

    Sunday, July 7, 2013 4:35 AM
  • Can Kocak,

    I Have the same problem.

    I Don´t understand the resolution. 

    What to do?

    Thanks,

    Thursday, July 11, 2013 8:05 PM
  • Has anyone got an answer for this problem yet ?
    Wednesday, August 7, 2013 4:28 PM
  • Can,

    The proposed answer is adding the SharePoint server to mail relay. If you have relay in the company the relay should accept the incoming request, to do a quick test, you can google for sample smtp test script , if the script can send email then its good if not you need to add SharePoint server IP to relay.

    • Marked as answer by Can Kocak Monday, August 26, 2013 1:17 PM
    Wednesday, August 7, 2013 5:09 PM
  • See: http://www.petenetlive.com/KB/Article/0000542.htm#e2010 for instructions on adding SPS to the mail relay
    Wednesday, March 5, 2014 11:26 AM
  • Hi

    I have the same problem I can only send mail to certain users and not others, check the user profiel and if users have valid email account please help me validate that may be happening 

    I have several production flows with the same problem

    Friday, May 23, 2014 12:34 AM
  • I do have the same problem and resolved using following steps.

    1) Validated whether User profiles are synchronized and the job is running or not. Job should be in working state(i.e not stopped).

    2) Validated whether Email property of user profile is filled with actual emails.

    3) In my case our AD itself doesn't contain emails and hence emails are not synced.

    4) Manually updated emails as number of users are less and started checking the workflow.

    5) Emails are sent, but they are sent from a mail "alerts@workflow".

    6) Our servers are not updated to latest patches as we were under testing and don't want to compromise on the build so far.

    7) Updated the Email activity xaml in the database of workflow management DB with"" instead of alert@workflow.

    8) Ran the workflows, and the emails are sent with address configured in central admin.

    Regards,

    Nagendra.

    Tuesday, December 30, 2014 4:44 AM
  • Hi all,

    I am facing a problem with some Site workflow.

    Have created one simple site workflow in SP Designer 2013 with "Email" notification.

    Once I Publish the workflow,I am not getting  Email notification and workflow not getting triggered and getting error below.

    Retrying last request. Next
    attempt scheduled in less than one minute. Details of last request: HTTP
    InternalServerError to
    https://ppm.techmahindra.com/DemoPWA/_api/sp.utilities.utility.SendEmail
    Correlation Id: ade77d40-7b47-74e9-abb1-2bb1fd765202 Instance Id:
    5ef856c4-c4ec-4b7e-862e-af1d5ad2311b

    The SMTP server requires a secure connection or the client was not
    authenticated. The server response was: 5.7.1 Client was not authenticated

    Kindly find the screenshots of the workflow error and help me on this.

    Thanks in Advance


    Soumya T | EPM Consultant

    Tuesday, October 10, 2017 10:11 AM