web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Mails sent from CRM using Server Side Sync get Stuck in Exchange as "drafts"

(0) ShareShare
ReportReport
Posted on by 95

Hi

We have Problems sending Mails (mostly with Attachement) from CRM per Server side Sync.

Instead of beeing sent it remains as a draft in the sending User's Exchange-Profile.
The main problem occures in a crm-queue with a shared Mailbox configured to recive and send mails per ServerSideSync.
But I also could reproduce the symptom with a normal "user" (who normaly use "Outlook-Client" Sync for other reasons)

We use

  • Dynamics 365 8.2.1.176 (and previous Versions) onPremise,   
  • Exchange Server Version: Exchange 2010 Sp3 Ru18

When the error occures, CRM Traces show the error “Connection closed” while trying to attach the attachment to the already created mail.
Sometimes he fails after attaching, but still failed sending it (perhaps a second attachement, …)

Error creating attachment(s) for outgoing mail item GUID_HERE.  Error Details: Unhandled Exception: System.Net.WebException: Die zugrunde liegende Verbindung wurde geschlossen: Unerwarteter Fehler beim Senden..

It's a German system, so i dont know exactly how it's called in english.
Bing translates it as "
The underlying connection was closed: An unexpected error occurred while sending."

On the Exchange Site there is no "failure-entry", it looks like the crm just stopped the process.

The error morphed a little bit through time:

First mails where Stuck once, sent on second try.
Some time later then he needed 10 attempts, or mails got not sent at all, sometimes with Status sent in CRM, which was the worst

And now its again mostly 1 failing attempt. 

The error occurs on 3 different CRM-Servers, all using the same Exchange.

So my first thought was: Exchange Problem.
But we have other Programs using the EWS without Problems, and also not all Mails get stuck.
So its not a completely wrong config ...

Any Ideas?

I am also not sure about the category "Email Router".

As far as i understood "E-Mail Router" and Server Side Sync are two different things.

But the "Categories" - List does not include anything regarding E-Mails other than "E-Mail Router"
Is the "server side sync" also treated under this Name, or shold i use an other category?


best regards

Stefan

*This post is locked for comments

I have the same question (0)
  • Radu Chiribelea Profile Picture
    6,667 on at
    RE: Mails sent from CRM using Server Side Sync get Stuck in Exchange as "drafts"

    Hi Stefan,

    Glad I could help.

    Hope you manage to get to the bottom of it.

    Regards,

    Radu

  • Stefan E Profile Picture
    95 on at
    RE: Mails sent from CRM using Server Side Sync get Stuck in Exchange as "drafts"

    Hi

    First let me say thank you for your help.

    My colleague said: we tried to raise the timeout, didnt help.

    We have a Kemp-Loadbalancer.

    When we used it, we could reproduce the error 100%.

    Using "Reencryption" (or something called similar) on the Kemp seemed to solved this Problem.

    But we only got from 100% reproducible errors to the random occurences we have now.

    In the meantime disabling this function and addressing the LB does not restore the 100% errors , without us changing anything else ... (mysterious)

    At the moment we address one of our two Servers (HUB, CAS) directly, to avoid problems with the LB, and have errors at random mails simmilar to going through the NLB with reencryption..

    Tanks

    Stefan

  • Radu Chiribelea Profile Picture
    6,667 on at
    RE: Mails sent from CRM using Server Side Sync get Stuck in Exchange as "drafts"

    Hi Stefan

    Thank you for your reply.

    You can increase the timeout via the web.config of the IIS Application - in this case the EWS.

    Here is a link that shows what you would need to enter: stackoverflow.com/.../how-to-increase-request-timeout-in-iis

    The execution timeout is in MS. However given the symptoms you described above, I'm not so sure this will help.

    I'd rather start with a network trace collected between CRM Async Server and Exchange - see if you have any lost packages.

    Also do you have any Network Load Balancer configuration for Exchange? If the answer is Yes - How is the affinity set up? Have you tried disabling / bypassing it (connect directly to the Exchange server and not to through the NLB url)

    Hope this helps!

    Radu

  • Stefan E Profile Picture
    95 on at
    RE: Mails sent from CRM using Server Side Sync get Stuck in Exchange as "drafts"

    Hi

    Usually it happens only with attachements. We had some Mails with the same error without Attachement, but not in the last months. The Queue was very full with pending mails that time, so perhaps they were "colateral damage"

    Thats why i focus on mails with Attachements.

    I tried various attachements-Sices, 1 KB to 4 MB, and found no difference.

    My first thought was, that something happens when uploading the file, which couses the Connection to close.

    Bigger attachements should fail more often then, but the dont.

    Since the Mails that get stuck are in CRM i can not sent "exactly" that Mail through other Programs, but i tried a copy with same from, to, Subject, Attachement and Body.

    --> No Problem

    But since the crm can send it on the second try too, that doesnt mean much.

    "Increasing  Timeout on exchange"

    Since i am not the Exchange-expert in our Team, which Timeout do you mean? just that i know excatly what to ask my colleague ...

  • Radu Chiribelea Profile Picture
    6,667 on at
    RE: Mails sent from CRM using Server Side Sync get Stuck in Exchange as "drafts"

    Hi Stefan,

    Are you able to reproduce the issue also without attachments?

    How large are the attachments that you noticed failing?

    You mentioned that you have other applications using EWS - if you try to sent the same e-mail & attachment through those apps, does it work or do you see the same behavior?

    Also, have you tried increasing the timeout on Exchange and see if this makes any difference?

    Regards,

    Radu

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
Christoph Pock Profile Picture

Christoph Pock 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans