Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Custom Workflow - Sending Email Failed

Posted on by 105

Hi,

I am trying to send an email through code, 

When I try to test in Dev, its working fine, but when I moved to production. 

It is failing,

In the code, before sending an email i am trying to update the email message and send.

below is the error message:

Error Message:

 

Unhandled Exception: Microsoft.Xrm.Sdk.InvalidPluginExecutionException: Error Sending an emailAn unexpected error occurred.   at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Update(Entity entity, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType)

   at Microsoft.Crm.Extensibility.InprocessServiceProxy.UpdateCore(Entity entity)

   at Workflows.CustomActivities.SendEmailToContacts.sendEmailNotificationForContacts(WorkflowUtils workflowUtils, CodeActivityContext context)

   at Workflows.CustomActivities.SendEmailToContacts.sendEmailNotificationForContacts(WorkflowUtils workflowUtils, 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)


Please help...!

*This post is locked for comments

  • Suggested answer
    Rawish Kumar Profile Picture
    Rawish Kumar 13,756 on at
    RE: Custom Workflow - Sending Email Failed

    Hi , Its very difficult to know what went wrong by looking at it.

    It is very generic error - i would suggest you to look into trace logs- you will definitely get something there :

    crmdiagtool2011.codeplex.com  

    try crm diagnostic tool.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans