When creating and sending an email from D365, the default functionality will populate the FROM sender as the user creating the email. Depending on a users role within the organisation, if they work on a team managing cases or other shared work, emails may need to all come from one email address. The users email address needs to be accurate in the system so we can’t change that, but we can use a queue combined with a workflow to send emails from queue rather than the user.

First, go to Settings, Business Management then click on Queues.

Create your queue (if you don’t have one already) by using your group email address in the incoming email. Save the queue.

At the top of the queue, click on Open Mailbox. From here, a user with Global Administrator (Office 365) access should click on Approve Email. One approved, then Test & Enable Mailbox to allow emails to be sent out from this email address via D365.

Once the queue is set up and the mailbox is approved and enabled, create a new workflow. Make sure it’s a real-time workflow so it will run before the email gets sent out. Make sure it starts After the record is created.

*UPDATE – 11/10/2018* – originally I had stated in the post to also tick Record status changes and change that to Before. Although the email ended up getting sent and received, the status of the email record in CRM remained as ‘Pending Send’. Removing this as part of the scope sends out the email and allows the status of the email to change to ‘Sent’. Thanks to Una Clancy and several other people for the comment about this, which prompted me to investigate further! *END UPDATE*

Your workflow should look something like this. Created By isn’t needed if this should be changed for all users. However, if it should only happen for SOME users, or under specific circumstances (if regarding a case for example) make sure you build this in to the conditions.

When updating the email, set the properties to use the queue you set up as the From object.

When a user creates a new email, their name will still show as the From person.

Once Send is clicked the workflow will run, and the From will be switched from the user creating the email to the queue you selected instead. This way the users will not have to remember to change it over each time they create a new email.

Check out the latest post:
Wave 2 2024 Customer Insights Journey Chat With Amey Holden

This is just 1 of 462 articles. You can browse through all of them by going to the main blog page, or navigate through different categories to find more content you are interested in. You can also subscribe and get new blog posts emailed to you directly.

37 thoughts on “Automatically Send Emails From A Queue

  1. Hi Megan.
    Thank you for this interesting post.
    Can it be used when sending bulk email against marketing list?
    The queue can be used only to send but not to receive emails?
    Regards, Emma

    1. Hi Emma, queues are used to send OR receive emails. So you could use a queue to receive incoming emails to support@meganvwalker.com and then use a record creation rule to create cases for each email. Or, you might have an email like notifications@meganvwalker.com or DoNotReply@meganvwalker.com so you don’t want responses coming back in to CRM, and only use it to send from. When you set up the Queue and activate the mailbox you can determine if you use it for Incoming Emails, Outgoing Emails or both. And yes, you could use your Queue to send your bulk emails for sure! You would just need to have a workflow similar to what I have described in this post to make it change to send from the Queue.

    2. Hello Megan,

      thanks for your tip regarding setting the From e-mail to a Queue e-mail.
      I have tested it and it work – that is, the e-mail I get is sent from the Queue.
      However, when I open the Mail activity I can see, that D365 does not consider the mail sent and the real-time workflow has thrown an exception saying: “Cannot update parties unless email is in draft status”

      I don’t know if you have checked that out if that problem is also on your instance?
      From what I can read, it seems to be a timing/race-condition between the Mail activity and the real-time workflow.

    3. Hi Andy, thanks for the comment and checking out my blog. I haven’t seen that issue. The only thing I am wondering, do you have the condition of running the workflow after the email is created and before the status changes?

  2. Hi Megan, thanks for sharing this post.

    I had the same scenario, and I followed your instructions. Everything is successful, but there is one problem. Every 30 min I am getting the same email that I sent, and that process will not stop unless I deactivate the workflow and queue. Any ideas what that could be?

    1. Hi Emscho, what happens to the status of the email in CRM? Does it show as Sent, or still Pending?

  3. email shows as pending send but email sends. its odd i get the draft error message also.

    1. Hi Una,

      Thanks so much for taking the time to review and ask a question. I took a moment to troubleshoot and came up with the answer. Take a look through the post again and you will see the update. Thanks again and apologies for any frustrations caused!

  4. Thanks Megan,

    I found the issue there was another workflow running at same time on email entity and mine workflow was running on every status change. so i put in a condition to say only run when status = draft and its now working and changing the status on emails to sent. thanks for your time.

  5. Hello Megan,

    When setting up a queue, does the email address have to be the same domain as parent BU? I’m trying to create a queue using a gmail address and receive failures when trying to test and enable mailbox.

    1. Thanks Megan! That’s exactly what I needed for setting up Gmail. In regards to setting up a queue for a another domain (different from parent), but owned by me. Would I simply need to add/validate those domains into the D365 portal, create the queue, and then test mailbox? I shouldn’t have to create a new email server profile for each domain would I?

    2. You are welcome, that article looked like it would help. In terms of any additional domains you want to send emails from, then yes you would need a different email server record set up for each one. If you think about it, if you didn’t need that to be set up, I could send out an email from your domain without you knowing our approving it right? So there needs to be a level of control and security, hence the need for the email server profile.

  6. Megan,

    Am I right in thinking that if the workflow is set up as you show then any email sent outward from the CRM system would have its From address altered to the queues email address?

    Can you think of anyway of making it more selective so that emails can be sent from a number of queues depending on what the query / question is about?

    1. Hi Dave, yes, you could certainly do that. If you look at screenshot 5 in the article, that shows part of the condition of the workflow. You could add alternative conditions and say ‘if the related cases ‘Case Type’ field equals “X”, send the email from “X Queue”, or if it equals “Y” send it from the “Y Queue”. So you could have lots of different clauses in that workflow. Does that help?

    2. Megan,
      You have pointed me in the right direction in being able to selectively pick the right queue. However, now when creating the workflow I cannot seem to specify anything other than a User or Team in the From field i.e. it will not let me specify a Queue name in the From Field.
      Any ideas why that might be?

    3. Hi Dave. I have seen that happen in a workflow before, where for some reason you are no longer able to access the From Field. It’s a pain, but what happens if you start again with a new workflow. Do you still have the same issue?

    4. Megan,
      I reproduced the WorkFlow twice (after deleting the previous attempts) and unfortunately still the same problem. Rather annoyingly, it will allow me to enter the Queue name in the To: field which seems a bit bizarre! I will keep on trying to resolve the problem.

  7. Hi Megan.
    Thank you for this interesting post.
    How to set the email filter condition to update the From email address only if we are replying to case email?

    I have tried couple filters but it didn’t worked for me.

    Any suggestions please.


    1. Hmmm good question. Maybe in the condition check the Regarding Case, then make sure the Case field contains data. Try that and see if that works.

  8. Hi Megan,
    I have followed all your instruction but got stucked where ‘When updating the email, set the properties to use the queue you set up as the From object’ – I am not able to see Queue as an option for the FROM object, but only User and Team are available to select from. Am I missing something?

    1. Hi Jessica, are you able to select the Queue using the from field on an email if you just create an email manually within D365?

    2. I’ve been chatting with Jerry, and he should be able to share more of what was reviewed. Hopefully you can get this resolved. it’s a strange situation!

  9. Hi Megan

    I have followed up the instruction and it works fine, but it has two bugs.
    1. If you reply to an email then the original message is not included in the email. Looks like CRM thinks it as a new email if the FROM email is changed from personal email to Queue. If I change the “Change Email Sender” workflow as a background workflowthen it includes the original email content in the reply.

    2. The workflow “Change Email Sender” works fine when you are replying to an email, but does not work when you send an email directly from Timeline and click on Send button. The following are four scenarios:
    Scenario 1: Reply to an Email and then click on Send button (works)
    Scenario 2: Reply to an Email and then click on Save and then Send button (works)
    Scenario 3: Create a new Email from Timeline and click on Save and then Send button (works)
    Scenario 4: Create a new Email from Timeline and click on Send button (does not work)


    1. Hi Manoj, thanks for the comment. Glad to hear it works as per the blog. Looks like your additional items are additional requirements, and very good ones too! Have you found a way to accomplish those?

    2. If you change the “Change Email Sender” workflow to run in background rather than synchronous then the original email content is in the reply email. The only thing is that you will need to Save the email first before sending.

      I have not found any solution for Scenario 4: Create a new Email from Timeline and click on Send button. This scenario doesn’t work, user will need to save first.

  10. Hello,

    thank you for the good solution!

    in my organization we have around 20 queues (one for each country) when someone is answering on a case we need to send it from the queue that the person send it to in the first place. I can not figure out to set up this workflow . Can you?

    Thanks a lot

    1. Hi Emma. Ah, tricky. I guess when you initially receive the email you could run a workflow to flag the case with the original Queue (using an Option Set field with a list of all your queues). Then when you set up the work flow to send the emails from a queue, use that field to check which queue it should go back out from. That should work.

    2. Hi Megan,

      This is great, adding the queue to the case is useful. If you are replying to an email on a queue that is not regarding a case, is there a way to pick up the queue location based on the queue that the parent email is linked to?


    3. Hi Kevin, what do you mean by queue ‘location’? You can find emails based on the related Queue Items (Object) option, and then add the value for the queue… .but not sure if that is what you are referring to?

  11. Hi Megan,
    Thanks for the good article!
    I’ve been using this workflow since CRM 2011, but now with Dynamic 365 Version 1612 on premise I have a problem. After changing the sender with the workflow, the emails stuck in Pending Send state, and I can nothing to do with them. I tried to change the status or the status reason or the No. of Delivery Attempts with a workflow, but it didn’t help. The emails didn’t send. I’m using Server Side Sync with the mailbox. Do you have any idea what am I doing wrong?
    Thanks in advance!

    1. Hi Peter. So the process was working fine, and then you have had an upgrade and that has broken it? Is that the case? If so, and it’s On Premise, did anything change with your email? If something worked and then is broken, you might need to contact Microsoft for a support case to check if something changed in that specific area.

  12. Hello Megan,

    I’ve followed this to just send out emails from the queue but the emails do not seem to be going out. The queue was created & approved likewise its mailbox which I also tested & enable it. The thing I’m confused about is the mailbox for that queue — its set to use an email server profile that is using “Credentials specified by a User or Queue”. However in the mailbox I am not specifying any credentials. From what I’ve read this should work. However I get an error in the Alerts section for the mailbox stating:
    The email message “Your mailbox is now connected to Dynamics 365″ cannot be sent. Make sure that the credentials specified in the mailbox Support Team are correct and have sufficient permissions for sending email. Then, enable the mailbox for email processing.
    Email Server Error Code: InvalidOutgoingMailboxCredentials”



  13. Hi Megan,
    This seems really useful!
    Would it be possible to dynamically choose the senders default queue (whatever it is set to) without including JS?
    Ideally I would want users from different teams to send as their team addresses, rather than either their own, or the single address specified in the triggering workflow.

    1. Hi Samuel. Yes, you could do that. In the workflow you should be able to select the Created By User, then the Default Queue from the list. Then whatever queue they have set on their user record would be used.

Comments are closed for this post.