never_break
never_break

Reputation: 17

Video as attachment in email

I use graph api to send emails to users. Is it possible to add video as attachment to email ? I converted .mp4 to binary string, set contentType to video/mp4, id to new Guid. I created a request to send email, got correct response, but I don't recieve email (emails without videos works fine).

Documentation is not really helpful.

Upvotes: 0

Views: 146

Answers (1)

user2250152
user2250152

Reputation: 20778

If the file size is between 3MB and 150MB, create an upload session, and iteratively use PUT to upload ranges of bytes of the file until you have uploaded the entire file. A header in the final successful PUT response includes a URL with the attachment ID.

There is a one limitation. An app with delegated permissions returns HTTP 403 Forbidden when attempting to attach large files to an Outlook message that is in a shared or delegated mailbox. With delegated permissions, createUploadSession succeeds only if the message is in the signed-in user's mailbox.

Resources:

Atttach large file

Upvotes: 1

Related Questions