microsoft-graph-mail

Email with Multiple Attachments using Graph API (>4 MB)

只谈情不闲聊 提交于 2020-11-29 18:59:15
问题 I'm using Microsoft-Graph API version 1.4 and trying to send mail with multiple attachments (with size greater then 4MB) using following code.. val address = EmailAddress() address.address = "vivek@domain.com" val recipient = Recipient() recipient.emailAddress = address val message = MyMessage() message.subject = "Test E-Mail" message.body = getItemBody() message.toRecipients = Collections.singletonList(recipient) val att = FileAttachment() att.contentBytes = File("/home/user/file.pdf")

Cannot pass “In-Reply-To” parameter to Microsoft Graph sendMail

自闭症网瘾萝莉.ら 提交于 2020-08-06 06:05:39
问题 I allow users to send emails with their Outlook account by using Microsoft Graph API, but it seems to be creating multiple threads on the other side. When using Mailgun API to send the user emails, I am able to pass the In-Reply-To message header that references the previous message Message-ID, and threads are clustered properly by clients on the other side (Outlook/Gmail etc) But when using Microsoft Graph API I try to pass the In-Reply-To and it is not accepted by the API graph_url = 'https

Microsoft Graph API - unterminated string literal Error when searching for emails which contain # in the subject

和自甴很熟 提交于 2020-07-08 02:45:49
问题 When i am searching for emails on office 365 in a batch query, i am getting a unterminated string literal error. This is happening only when i have a # character in the subject search query. Forum discussions like this (https://issues.oasis-open.org/browse/ODATA-1101) have suggested me to percentage encode the # symbol but it gave the same error. When I am POSTing the below request to the batch endpoint(https://graph.microsoft.com/v1.0/$batch) { "requests": [{ "id": 1, "method": "GET", "url":

Microsoft Graph API - unterminated string literal Error when searching for emails which contain # in the subject

牧云@^-^@ 提交于 2020-07-08 02:44:14
问题 When i am searching for emails on office 365 in a batch query, i am getting a unterminated string literal error. This is happening only when i have a # character in the subject search query. Forum discussions like this (https://issues.oasis-open.org/browse/ODATA-1101) have suggested me to percentage encode the # symbol but it gave the same error. When I am POSTing the below request to the batch endpoint(https://graph.microsoft.com/v1.0/$batch) { "requests": [{ "id": 1, "method": "GET", "url":

How to pass $value in request to get mime content of mail using graph sdk not api

别来无恙 提交于 2020-01-25 08:22:09
问题 I am using Graph SDK in C# to read mail messages and I am able to do that. I want Mime Content of my mail message. How do we pass $value in my request using SDK. Sample code: mails = await graphserviceclient .Me .Messages .Request() .Top(2) .GetAsync(); Please let me know how we can pass $value in C# code which uses graphserviceclient. 回答1: We are waiting for some metadata updates to make this easier in the SDK. For the moment, the workaround for getting the MIME content looks something like

Microsoft Graph API Errors

雨燕双飞 提交于 2020-01-05 05:42:11
问题 I've been using Microsoft Graph Api's v1.0 List messages method for nearly five months. In the last few days it started returning errors when ever i add the $search parameter in my query string. It gives either a 503 or 504 error code The error is received after give or take 20 sec. along with following message: { "error": { "code": "UnknownError", "message": "", "innerError": { "request-id": "8fd1d9ed-cde6-4237-b1a7-ab089a28d37e", "date": "2019-07-02T10:09:48" } } } Microsoft Graph errors

Expanding and Filtering MS Graph API Does Not Work

随声附和 提交于 2020-01-05 04:10:07
问题 I need to get an eventMessage from a user's mailbox that is associated with a specific event . I have the event's iCalUId but I am unable to filter on it: /users/${roomEmailAddress}/messages ?$expand=microsoft.graph.eventMessage/event($filter=iCalUId eq '${iCalUId}') What I am trying to do is get all messages, then expand so that I see the events associated with each message, then filter each event to find the one I care about. However, I get a response with all events and the filtering

Microsoft Graph API - SendMail http 400 - API url from documentation not working

那年仲夏 提交于 2019-12-05 16:44:31
问题 My application sends email using Microsoft Graph. We followed the documentation, this was working as expected for almost a year: https://graph.microsoft.com/v1.0/users/me/microsoft.graph.sendmail Since 3/8/2019, the same code sendmail API in PROD started failing with the HTTP 400 - Bad Request : { "error": { "code": "TargetIdShouldNotBeMeOrWhitespace", "message": "Id is malformed.", "innerError": { "request-id": "0de5a4eb-dac4-4d98-a4b4-178e503a6657", "date": "2019-03-19T17:16:20" } } } As a

Why do I get Gateway Timeout whenever my MS Graph API mail search finds no results?

荒凉一梦 提交于 2019-12-04 03:30:14
问题 As of this week I am suddenly getting gateway timeout from Graph when my mail search finds no results. I am using a query like this one: https://graph.microsoft.com/v1.0/users/shared@notreal.com/mailFolders/AllItems/messages?$search="participants:some.person@fake.com"&$select=from,subject,HasAttachments,Id,SentDateTime&$top=100 This is a Graph query which requests up to 100 emails from the Office 365 mailbox of shared@notreal.com where the sender or receiver includes some.person@fake.com .