How to Retrieve Attachments Larger Than 5MB Using EWS

WongYK 5 Reputation points
2025-01-09T07:39:30.9833333+00:00

I'm working with Exchange Web Services (EWS) and need assistance on how to retrieve attachments that are larger than 5MB. By default, EWS seems to limit the attachment size for retrieval, but I need to ensure that larger attachments can be fetched. Could anyone share how to handle this scenario and any configuration that might be required on the server side to support large attachments? If possible, can you provide a sample code snippet for this?

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,141 questions
Outlook Management
Outlook Management
Outlook: A family of Microsoft email and calendar products.Management: The act or process of organizing, handling, directing or controlling something.
5,387 questions
Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
560 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,747 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Xintao Qiao-MSFT 5,630 Reputation points Microsoft Vendor
    2025-01-10T06:00:56.7333333+00:00

    Hi, @WongYK

    To retrieve attachments larger than 5MB using Exchange Web Services (EWS), you first need to make sure that your Exchange server is configured to support larger attachments. This may involve updating certain settings on the server side, but this is usually handled by the Exchange administrator. The configuration settings include parameters such as 'MaxSendSize', 'MaxReceiveSize' and 'MaxAttachmentSize'.

    Unfortunately, the “Exchange Server Management” tag currently focuses only on mail and mail flow, not code.

    You can refer to exchange server - How to download >1 MB Email attachment using EWS in C# - Stack Overflow

    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information. 


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.