gmail-api

How does a Gmail message Id or ThreadId map to the new Gmail UI?

这一生的挚爱 提交于 2019-11-27 12:26:45
问题 Edit : addressing the first comment below and for clarity, this isn't a code question. The question is simply: What do I put into the URI querystring of the new Gmail UI to view a draft message created by the Gmail API? Despite this not really being a code question, I'm asking on Stack Overflow as it's Google's preferred platform for Gmail API questions. -- If I view a draft message in the new Gmail UI, the URI is something like this: https://mail.google.com/mail/u/1/?zx=iij9apqgzdf4#drafts

Gmail API: 400 bad request when trying to send an email (PHP code)

空扰寡人 提交于 2019-11-27 09:12:55
I expected the code below to send an email, but I'm only getting this: An error occurred: Error calling POST https://www.googleapis.com/gmail/v1/users/me/messages/send : (400) Bad Request I get a 200 OK using the Google Developers Console here at the bottom. Any help? $client_id = '599901532082-js1r50n20q6n5mir9fo1g81qkj9kfn3j.apps.googleusercontent.com'; $service_account_name = '599901532082-js1r50n20q6n5mir9fo1g81qkj9kfn3j@developer.gserviceaccount.com'; $key_file_location = '/tmp/APIProject-cb6558ba6435.p12'; $client = new \Google_Client(); $client->setApplicationName("Client_Library

Gmail REST api batch support for getting messages

拟墨画扇 提交于 2019-11-27 07:57:29
问题 We need to switch from google client library to Gmail REST api in our project, and I've encountered a problem with batch() because it is not available in REST api - you can only get list of ids of messages and then get each message one by one using it's id. If we use that gmail library everything seems to be clear. We create a batch object and then queue each GET request inside of it. We don't have to care how it's implemented inside. At the moment I'm trying to do some POC and I'm testing

GMail API Emails Bouncing

我与影子孤独终老i 提交于 2019-11-27 07:43:46
问题 Using GMail API in .Net. Creating messaging using Net.Mail.MailMessage. Then using MimeKit to create MimeMessage (using this to send attachment + HTML message). Passing MimeMessage.ToString to Base64 encoder. No API error. Code runs through ok. I can see the message in the sent page in GMail. Mail looks perfect (and the send actually return message id). But then there is the following appended message to this mail in Gmail. Bounce <nobody@gmail.com> An error occurred. Your message was not

GmailApp - Add label to specific message, not the thread

泪湿孤枕 提交于 2019-11-27 07:28:01
问题 I'm building a script to automatically move my emails from one label to the next on a day by day basis (so that a message that is stored labelled "5 days" will automatically be labelled "4 days" tomorrow then "3 days" the day after that, and so on). The problem is that it applies the label to the entire thread, not just the message - which is problematic if you have Conversation View turned off and the various emails seperated under different labels. Here is my script (which has a daily

GMail REST API: Using Google Credentials Without Impersonate

試著忘記壹切 提交于 2019-11-27 06:16:33
问题 Is it possible to use Google Credentials for GMAIL REST API without using impersonation?? In many examples of GMAIL REST API i see is mandatory to use an impersonation account associated to a domain and Google APPS. I just want to use GMAIL REST API api server-to-server : f.e: GoogleCredential credential = new GoogleCredential.Builder().setTransport(httpTransport) .setJsonFactory(jsonFactory) .setServiceAccountId(serviceAccountUserEmail) **.setServiceAccountUser("myuser@mydomain.com)**

Google Apps Script - Label Email Based On Email Body [Optimize Code]

╄→гoц情女王★ 提交于 2019-11-27 05:33:11
I aim to do the following: An email is received that matches the criteria be placed in Label A folder. A new email is received. This new email's body is a duplicate of the first received. This new email skips the inbox and goes to Label B folder. Here is how I implemented it: All new emails are labeled as "Original" When the script runs, it compares the email body with all previous ones. If the body is a duplicate, it is labeled "Duplicate", moved to "Archive" and "Original" label is removed. The code is as follow: function emailLabeling() { var DUPLICATE = _getLabel(); var labels = GmailApp

How to integrate Gmail login in Android application? [duplicate]

左心房为你撑大大i 提交于 2019-11-27 04:44:23
问题 This question already has an answer here: Enable Gmail login in my application 2 answers Which is the right way to implement Gmail login in my Android application? https://developers.google.com/gmail/api/quickstart/quickstart-java or http://www.javacodegeeks.com/2013/10/google-account-integration-in-android-login-with-gmail.html I want to provide Gmail login for getting user credentials.Somebody please help me. 回答1: Official guide: Google Login Also look at this very good tutorial with demo.

Gmail API Users.messages: list

跟風遠走 提交于 2019-11-27 04:43:45
问题 I'm working on email platform (in Objective-C language) and want to fetch some mails using GTMHTTPFetcher and GTMOAuth2Authentication frameworks. I'm using gmail APIs for getting userinfo and getting appropriate response. I want to fetch emails for the user's inbox with category; I'm thinking to use the SYSTEM level labels such as CATEGORY_SOCIAL for social, CATEGORY_PERSONAL For personal/primary, etc. For this functionality, I'm using following GET API: https://www.googleapis.com/gmail/v1