gmail-api

Google REST API - message in an RFC 2822 formatted and base64url encoded string

本小妞迷上赌 提交于 2019-12-18 04:14:31
问题 I try the use the - try it of Google REST API - Users.messages: send . There is there a required parameter - raw - The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in messages.get and drafts.get responses when the format=RAW parameter is supplied. I checked about RFC 2822 format and seems it should displayed as the sample here , then I encoded it the base64URL with this encoder and paste it the raw field of the try it and I get - Invalid value for

Gmail API In-Reply-To not working(Google not handling on one side)

不想你离开。 提交于 2019-12-17 20:44:10
问题 Problem: When Reply to email is sent via api then in receiver side it is showing as thread that contains two email messages( good on receivers side ) but the sender has two different emails one in Inbox and one in Sent Mail( Problem in sender side ). for example: Email is sent from A to B. Again B sends to A. here in api i am giving the previous email message-id in "In-Reply-To" and "References",(according to rfc822 format) here Google is handling that message-id on the A side but not on B

Gmail API - plaintext word wrapping

ぃ、小莉子 提交于 2019-12-17 20:22:15
问题 When sending emails using the Gmail API, it places hard line breaks in the body at around 78 characters per line. A similar question about this can be found here. How can I make this stop? I simply want to send plaintext emails through the API without line breaks. The current formatting looks terrible, especially on mobile clients (tested on Gmail and iOS Mail apps). I've tried the following headers: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am I

Gmail API: Insufficient Permission

随声附和 提交于 2019-12-17 20:14:00
问题 THE SITUATION: I am testing the Gmail API for my app. I have tested some requests and they are working fine. For example get messages, get user history, get draft list etc.. Basically all the read only requests are working fine. I have instead some issues related with permission with other requests, for example when i have to write or delete a draft. This is the error i get: (403) Insufficient Permission THE CODE: This is the function to initialize the app: public function gmail_init_service(

MIME Headers Not Making it Through Gmail API

99封情书 提交于 2019-12-17 16:49:44
问题 I'm trying to automate the creation of drafts via the Gmail API, and I want these drafts to be responses to existing emails. To do this, I believe I need to set the "threadId" header (Gmail specific), the "References" header, and the "In-Reply-To" header. Additionally, for Gmail to consider the message to be a reply, the "Subject" header must match the original email. I'm hardcoding all of these headers into a MIMEText object, and then base-64 encoding (urlsafe) the message as a string and

Bulk-fetching emails in the new Gmail API

不羁的心 提交于 2019-12-17 16:27:15
问题 I'm using the python version of the newly released Gmail API by Google. The following call returns just a list of message ids: service.users().messages().list(userId = 'me').execute() But then I just have a list of message ids and need to iterate over them and fetch them one-by-one. Is there a way to get the whole message content for a list of ids, in a single call ? (Similar to how it's done in the Google Calendar API) ? And if not supported yet, is this something that Google would like to

Creating draft via Google Gmail API

扶醉桌前 提交于 2019-12-17 14:57:34
问题 I am trying to create a draft message for a logged in user but keep getting the error Missing draft message when I run the below require 'google/api_client' client = Google::APIClient.new client.authorization.client_id = ENV['GOOGLE_CLIENT_ID'] client.authorization.client_secret = ENV['GOOGLE_CLIENT_SECRET'] client.authorization.grant_type = 'refresh_token' client.authorization.refresh_token = User.last.refresh_token token = client.authorization.fetch_access_token! gmail = client.discovered

Gmail API returns 403 error code and “Delegation denied for <user email>”

人盡茶涼 提交于 2019-12-17 07:29:23
问题 Gmail API fails for one domain when retrieving messages with this error: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 OK { "code" : 403, "errors" : [ { "domain" : "global", "message" : "Delegation denied for <user email>", "reason" : "forbidden" } ], "message" : "Delegation denied for <user email>" } I am using OAuth 2.0 and Google Apps Domain-Wide delegation of authority to access the user data. The domain has granted data access rights to the application. 回答1:

Gmail API returns 403 error code and “Delegation denied for <user email>”

倖福魔咒の 提交于 2019-12-17 07:29:01
问题 Gmail API fails for one domain when retrieving messages with this error: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 OK { "code" : 403, "errors" : [ { "domain" : "global", "message" : "Delegation denied for <user email>", "reason" : "forbidden" } ], "message" : "Delegation denied for <user email>" } I am using OAuth 2.0 and Google Apps Domain-Wide delegation of authority to access the user data. The domain has granted data access rights to the application. 回答1:

How to send a message successfully using the new Gmail REST API?

社会主义新天地 提交于 2019-12-17 06:41:24
问题 I'm currently trying to test the new Gmail REST API . In the API Explorer it is possible to authorize requests using OAuth 2.0 and to execute a request, i.e. send a message. First I authorized. I'm using the following test data (and of course I used a valid to email address): { "raw": "c2VuZGluZyBhIG1haWwgdXNpbmcgR21haWwgUkVTVCBBUEk=", "payload": { "headers": [ { "name": "to", "value": "info@something.com" }, { "name": "from", "value": "taifunbaer@gmail.com" }, { "name": "subject", "value":