Frederik Gysel
Frederik Gysel

Reputation: 85

Sending large attachments with MS Graph API

I came accrosss below article about sending large attachments with the MS Graph API: https://learn.microsoft.com/en-us/graph/outlook-large-attachments?tabs=http

Basically, if I understand well, I have to follow below steps from the moment my attachment is larger than 3MB.

1/ create an e-mail as draft. (https://learn.microsoft.com/en-us/graph/api/user-post-messages?view=graph-rest-1.0&tabs=http)

2/ create an upload session for the e-mail created in step 1/

3/ use the upload session to upload ranges of bytes (chunks of the attachment)

4/ send the draft e-mail.

When my attachment i smaller than 3MB, i am following 'example 3' from below link: https://learn.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=http (='normal' way)

Out of curiosity and to see what happens / which error I am getting, i've just tried to send an e-mail with an attachment of 10MB via the 'normal' way (via Example 3 in above link) and it just works !?

Can somebody please help me to understand why I then should use 'upload session' when my attachement is larger than 3MB if I can just send that large attachment via the 'normal' way?

Thx

Upvotes: 0

Views: 57

Answers (0)

Related Questions