Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Activate vs Test and Enable mailboxes in 365 Online

  • 1.  Activate vs Test and Enable mailboxes in 365 Online

    Posted Aug 28, 2019 07:14 AM
    I know that you can only have 1 synchronised mailbox across a series of environments, this makes sense and when you test and enable a mailbox it tells you that it will be that environment that will be synchronised with exchange and any previous ones will not .

    However I want to write a workflow that changes the from from the current user and   uses a queue to send the email, and to develop this  in a sandbox  environment that has the same queues and mailboxes. As this sandbox was restored from production the guids of the mailboxes and queues are the same as production.

    When i run my workflow which changes the from in realtime  it errors saying invalid from set a source with a valid mailbox. In the sandbox environment, this is true as the mailbox in sandbox is not activated? As this mailbox is used in production for both sending and receiving i don't want it to sync or send emails?

    if I activate it in the sandbox will it have any impact on production? Hence my subject what is the difference between Activate and Test and Enable.

    I'm using 365 Online.



    Steve Whitcher
    Dynamics Developer


  • 2.  RE: Activate vs Test and Enable mailboxes in 365 Online

    Posted Aug 28, 2019 08:22 PM
    I got around this (and many other shortcomings in the OOTB email integration) by using Azure LogicApps (Flow would probably work). It does the following:
    1. Query to find all email in Pending Send status
    2. Change the From field to the Queue account
    3. Send the email out using SendGrid
    4. Change the status of the email to Pending Send.

    Azure LogicApps (and Flow) can be a (relatively) easy replacement for the old mail router if your configuration is not too complex or you just want to test outbound email. If you are on-premises, then you can use free Azure Gateway to let Logic Apps access your SQL database (not advised unless you really know what you are doing).
    Was this helpful? I can demonstrate if you are interested.

    If this answered your question, please click on the arrow button next to Reply Inline and choose 'Make Best Answer.'
    Nelson Johnson, Solution Architect
    BroadPoint, Inc., Bethesda MD
    Link with me!


  • 3.  RE: Activate vs Test and Enable mailboxes in 365 Online

    Posted Aug 29, 2019 11:12 AM
    Hi @Steve Whitcher, ​we have achieved what you require by using Javascript.  From what you've said I don't think using a workflow will be suitable.

    The Javascript runs on form load of the Email and uses the Parent Activity ID field which is hidden on the form.

    When the user creates a reply to an email from a queue, the Parent Activity ID field is populated on the reply email and contains a lookup to the original email.  The Javascript will get the queue that the original email came in on via the Parent Activity ID and populate it in the From field on the reply email.  This means that every email that comes in on a queue will be replied to from that queue and NOT the users own mailbox.

    I'm happy to share the code with you.  I'm not a developer and didn't write this code but I understand what it does.

    Mark Aston
    Data Analyst
    Ordnance Survey
    Southampton, UK


If you've found this thread useful, dive deeper into User Group community content by role