Looking for PowerObjects? Don’t worry, you’re in the right place! We’ve been part of HCL for several years, and we’ve now taken the final step in our acquisition journey: moving our website to the HCL domain. Nothing else is changing – we are still fanatically focused on Microsoft Business Applications!

PowerObjects Blog 

for Microsoft Business Applications


Workflow Generated Email stuck in “Pending Send” – Get it sent!

Post Author: Joe D365 |

If you have a custom workflow email stuck in CRM with a status reason of "Pending Send," then today's blog is for you! Today we'll show you how to get your custom workflow emails to send. Let's dive in!

Whenever your email is stuck in "pending send" status, you should always complete the initial steps for troubleshooting the email send issue, including:

1. Checking if the mailbox is approved in CRM

2. Checking the email router service

3. Checking if the user has been disabled

4. And checking if the user has been able to send other email messages out of CRM.

If you are still experiencing issues and your workflow generated email is still not sending, there might be another issue afoot!

Let's say you created a workflow where your goal is to send the email from CRM after a custom plugin populates the email body with content first (see example below).

 

Workflow Generated Email stuck in “Pending Send” – Get it sent!

In this workflow, you completed the following steps:

1. Create the email.

2. Have the custom workflow plugin populate the email body.

3. Change the email record status to "Pending Send."

Setting the email record status to "Pending Send" will indicate to the email router or SSS that this message is ready and waiting to send. While this is absolutely true, it's only half of the solution we need to have CRM send the email.

The critical piece to get our custom workflow email to send is setting the value of the "No. of Delivery Attempts" field to 0. You can find this field in the properties of the "Create Email" step of the workflow. Setting attempts to 0 will trigger the process for your email router or SSS to pick up and send the message from CRM.

Workflow Generated Email stuck in “Pending Send” – Get it sent!
With this in mind, your workflow should be configured as such:

1. Create the email and update the "No. of Delivery Attempts" field on the email record to 0.

2. Have the custom workflow plugin populate the email body.

3. Change the email record status to "Pending Send."

Workflows are a great tool for automating actions like sending email in Dynamics CRM.

Workflows in CRM are a great way to use CRM for marketing automation as well. Want to learn more about marketing automation and CRM? Watch our video, Marketing 101 with Dynamics CRM!

Happy CRM'ing!

Joe CRM
By Joe D365
Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.

15 comments on “Workflow Generated Email stuck in “Pending Send” – Get it sent!”

  1. I had been using this technique in CRM 2011 without a problem (Create Email and set Number of Attempts to 0 > Update Email Content > Set Status of Email to Pending Send). It doesn't seem to work for me in CRM 2016, though - the email status stays as 'Pending Send' indefinitely.

    Interestingly, if I set the Status of the email back to Draft and then hit the Send button, the email does send. Is there other fields that need setting before it will get picked up by the email router?

    1. Hi Laurence - Yes - there is another field to reset. I thought it was the number of attempts...either set it to null or 0. Do an advanced find and add all email fields. Then compare a draft email and a pending sent email were it does not get picked up.

    1. Hi Virginia. There are various ways to architect this. One method is to have a workflow that runs on create of new contracts and times out until 1 day before due date. Then email the contract owner or user. Another method is to use an integration tool such as scribe or ssis, run nightly, and this looks for contracts that are within 1 day of expiring. On these the integrations sets a bit field which then triggers a workflow to send an email. The scribe/ssis option is more efficient than single workflow method that sits and waits.

    2. Hi Virginia. There are various ways to architect this. One method is to have a workflow that runs on create of new contracts and times out until 1 day before due date. Then email the contract owner or user. Another method is to use an integration tool such as scribe or ssis, run nightly, and this looks for contracts that are within 1 day of expiring. On these the integrations sets a bit field which then triggers a workflow to send an email. The scribe/ssis option is more efficient than single workflow method that sits and waits.

    3. Hi Virginia. There are various ways to architect this. One method is to have a workflow that runs on create of new contracts and times out until 1 day before due date. Then email the contract owner or user. Another method is to use an integration tool such as scribe or ssis, run nightly, and this looks for contracts that are within 1 day of expiring. On these the integrations sets a bit field which then triggers a workflow to send an email. The scribe/ssis option is more efficient than single workflow method that sits and waits.

  2. I'm using Dynamics 365 Online with Server-Side Sync... I've tried changing many fields: set Activity Status to "Open" (this is not available on the create email step, but is available on a subsequent Update step); clear # of Send Attempts, or set to zero, or set to one; clear Actual End... nothing worked. As a test I created an on-demand workflow with one step: to change status to Pending Send, and triggered it on a new Draft email that I'd created manually. The mail was not sent. I can send email just fine by clicking "Send" on the email detail view, as well as by using the "Send Email" step on a workflow.

    There's lots of info on the web about creating emails in custom workflows that use the "Pending Send" method to send email messages. Is this method deprecated? Is it a bug in recent versions of CRM or SSS?

    1. Hi - This shoudl still work, but in the past we have seen little bugs appear then be fixed later on with a hotfix. One area to check is the 'from' of your email. To rule out security, make the from a user with admin rights, that is also the owner of this workflow.

  3. Hi Joe, my problem is not that the emails aren't sending. My problem is that the emails get sent, but the status of the email in CRM does not change. So CRM keeps sending the same email over and over again (about once every hour). Any thoughts?

  4. Hi Joe, my problem is not that the emails aren't sending. My problem is that the emails get sent, but the status of the email in CRM does not change. So CRM keeps sending the same email over and over again (about once every hour). Any thoughts?

  5. Hi Joe, my problem is not that the emails aren't sending. My problem is that the emails get sent, but the status of the email in CRM does not change. So CRM keeps sending the same email over and over again (about once every hour). Any thoughts?

    1. Hi Tod. We have seen this before. Are you using the email router for sending outbound emails? Check the smtp or exchange server that is sending these emails. In previous cases, we saw an smtp server that was accepting the emails, but sending some type of error so the email router thought it was nto sent successful. Hense the reseeding over and over. Items todo: patch exchange, install latest ur in email router, delete any pending sent emails with large attachments.

    2. Hi Tod. We have seen this before. Are you using the email router for sending outbound emails? Check the smtp or exchange server that is sending these emails. In previous cases, we saw an smtp server that was accepting the emails, but sending some type of error so the email router thought it was nto sent successful. Hense the reseeding over and over. Items todo: patch exchange, install latest ur in email router, delete any pending sent emails with large attachments.

      1. Thanks Joe! I worked with our development partner and they isolated it to some plugins that they'd developed for us was preventing the update of the status to happen.

PowerObjects Recommends