microsoft-graph-mail

Unable to get MIME version of a Message using $value

送分小仙女□ 提交于 2021-01-29 16:27:19
问题 I am unable to get MIME for a message using $value like specified in the documentation. How to get MIME? OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .header("Authorization", "Bearer " + accessToken) .url("https://graph.microsoft.com/v1.0/me/messages/k4ZDQ5LTgzMTYtNGZhYS04ZTU3LWZhMjFmZmUzNmE1YwBGAAAAAABzUENX1K4kR6h6KAAA7ENoUb5BySZFX6KemUxNwAAAv_a5nAAA=/?value") .build(); Response response = null; String body; try { response = client.newCall(request)

How to trace back bounced messages

心已入冬 提交于 2021-01-29 13:16:17
问题 I have a web services which allows me to send messages via office 365 hosted service. So far all works fine. But there is cases when an email bounces and I would like to mark that email bounced / undelivered in my CRM. In some cases the remote host returns undelivered: and the original subject as well as the email address it was send to. In case of google addresses this is not the case. So I can’t parse the subject to get the original message. Is there anywhere in the body or header any info

“The tenant for tenant guid does not exist” when using GraphAPI - Even with user type as Member

好久不见. 提交于 2021-01-29 07:12:43
问题 I am trying to access email using Microsoft Graph API. When I try to access the email I got the below error. Microsoft.Graph.ServiceException: 'Code: OrganizationFromTenantGuidNotFound Message: The tenant for tenant guid '<some id>' does not exist. Here is the code to get the emails var graphServiceClient = new GraphServiceClient(new DelegateAuthenticationProvider((requestMessage) => { requestMessage.Headers.Authorization = new AuthenticationHeaderValue("bearer", accessToken); return Task

Send email thru Azure AD Graph API as email alias

杀马特。学长 韩版系。学妹 提交于 2021-01-28 21:24:52
问题 In the Graph API explorer, you can send an email with the endpoint https://graph.microsoft.com/v1.0/me/sendMail and a basic json payload of "message": { "subject": "Meet for lunch?", "body": { "contentType": "Text", "content": "The new cafeteria is open." }, "toRecipients": [ { "emailAddress": { "address": "user@domain.com" } } ], "from":{ "emailAddress": { "address": "smtp:my_alias@domain.com" } } } When I send this request, it still sends the email as user@domain.com instead of my email

Sending email using ClientCredentialProvider is failing to find tenant guid

怎甘沉沦 提交于 2021-01-28 19:01:44
问题 I am using Microsoft Identity's OAuth 2.0 support to send email using Microsoft Graph. Created a personal email account as XXXX@outlook.com. Using this account I login to Azure AD and create a tenant there. Used ClientCredentialProvider (From msgraph-sdk-auth-java) as authorizer trying to send an email to myself. Steps: Created a Tenant account. Created an application and given permission in Graph>Application->Send.email etc Created a Secret key Below is the error I am getting: POST microsoft

download attachments from mail using microsoft graph rest api

浪尽此生 提交于 2021-01-28 03:48:24
问题 I've been successfully getting the list of mails in inbox using microsoft graph rest api but i'm having tough time to understand documentation on how to download attachments from mail. For example : This question stackoverflow answer speaks about what i intend to achieve but i don't understand what is message_id in the endpoint mentioned : https://outlook.office.com/api/v2.0/me/messages/{message_id}/attachments UPDATE i was able to get the details of attachment using following endpoint :

Sending email with Microsoft graph API work account

若如初见. 提交于 2021-01-27 19:18:58
问题 Does anyone know how to request permission to send emails using Graph API by an app that runs without a signed-in user? I have an Azure WebApp with permission to send email using Microsoft Graph. In the Azure portal (Azure Active Directory -> App registrations -> MyApp - API permissions), my app has granted permission for Mail.Send ( Type: Application : Description: Send mail as any user ). In the next step, I’m inviting a user from my organization. In Azure Ad the user type is Guest. I

Sending email with Microsoft graph API work account

♀尐吖头ヾ 提交于 2021-01-27 17:45:42
问题 Does anyone know how to request permission to send emails using Graph API by an app that runs without a signed-in user? I have an Azure WebApp with permission to send email using Microsoft Graph. In the Azure portal (Azure Active Directory -> App registrations -> MyApp - API permissions), my app has granted permission for Mail.Send ( Type: Application : Description: Send mail as any user ). In the next step, I’m inviting a user from my organization. In Azure Ad the user type is Guest. I

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

杀马特。学长 韩版系。学妹 提交于 2020-11-29 19:10:03
问题 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")

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

大憨熊 提交于 2020-11-29 19:04:49
问题 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")