Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Server-Side Sync (CRM and Exchange On-Premises) - error sending email with large attachment

(0) ShareShare
ReportReport
Posted on by 130

We are currently on CRM 2016 SP2.2 (8.2.2) on-premises using Server-Side Sync with our on-premises Exchange 2010 server.

Sending emails from CRM to Exchange works correctly if the email has no attachment or a small attachment (< 1 Mb in size). Anything greater than 1 Mb in size won't make it to Exchange.

I have activated tracing on the EmailConnector server role of the async service and see the following errors:

>Error creating attachment(s) for outgoing mail item fc05b4fa-1cd9-e711-914c-00155dcdb40a.  Error Details: Unhandled Exception: System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send.

[...]

>Inner Exception: System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.

[...]

>Inner Exception: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

Our incoming/outgoing email size limit are clearly greater than 1Mb. In fact, server-side sync can track an email with a 15 Mb attachment from Exchange to CRM, it just can't forward that email from CRM back to Exchange.

Anyone else experienced this issue? We're about to open an incident with MS but any ideas/advice would be appreciated. Thanks!

*This post is locked for comments

  • L-A Filiatrault Profile Picture
    130 on at
    RE: Server-Side Sync (CRM and Exchange On-Premises) - error sending email with large attachment

    Hi RSM2CRM, in our situation, the issue was that your size limit parameters can vary according to the interface your are using. The Dynamics 365/Exchange integration uses Exchange Web Services (EWS). Check if the following parameters for EWS:

    maxAllowedContentLength

    maxReceivedMessageSize

    These could be set lower than for other ways of connecting to Exchange such as MAPI.

    It would also explain how you could use an email account and send an email with >1Mb attachment but cannot send the same email with the same account through D365.

    Good luck!

  • Community Member Profile Picture
    on at
    RE: Server-Side Sync (CRM and Exchange On-Premises) - error sending email with large attachment

    This is happening is with Dynamics 365 online and Exchange Hybrid (online/onpremise).  Is anyone else having this issue where you can't send an email from CRM with an attachment over 1 MB?  Mind you, we have the email size limit and performed a number of system changes recommended by Microsoft and we are still experiencing this issue.

  • Rawish Kumar Profile Picture
    13,758 on at
    RE: Server-Side Sync (CRM and Exchange On-Premises) - error sending email with large attachment

    Thanks for the post - i will have a look on this and good to hear that you got it working :)

  • L-A Filiatrault Profile Picture
    130 on at
    RE: Server-Side Sync (CRM and Exchange On-Premises) - error sending email with large attachment

    This article helped: support.microsoft.com/.../unable-to-send-large-attachments-using-ews-client

    Turns out our server lacked the ProxyTimeout setting and the default value for the settings seems too low to transmit large attachments. We'll be adding that key to the EWS web.config file with a adequate value.

    Thanks again!

  • L-A Filiatrault Profile Picture
    130 on at
    RE: Server-Side Sync (CRM and Exchange On-Premises) - error sending email with large attachment

    That was an excellent idea, thanks Rawish. I configured using a Hotmail account since you can interface as an Exchange server profile using EWS via outlook.office365.com. I was able to send an email with a large attachment so there's most likely a connectivity/proxy server issue at play. Thanks!

  • Verified answer
    Rawish Kumar Profile Picture
    13,758 on at
    RE: Server-Side Sync (CRM and Exchange On-Premises) - error sending email with large attachment

    just thinking out loud - did you try to configure gmail quickly and test if that is also giving the same issue. Because i feel its proxy server issue.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
dkrishna Profile Picture

dkrishna 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans