gmail-api

Getting unread count in Sent Folder using Google Apps Script - GMail

北战南征 提交于 2019-12-23 20:58:20
问题 Is there a way to get Unread Mail count in Sent Folder? Basically, the feature I want is: When I reply to a message in mailing list that's filtered and doesn't pass my INBOX, I want all the subsequent replies to be reaching my INBOX. The way I'm trying to accomplish is that if I see a Unread Mail in Sent folder, that means that there is a new mail in a thread I was involved. I'm saying this because I see those mails as unread when I click "Sent" in Gmail's web interface. So, is there a way to

Gmail API multiple accounts

。_饼干妹妹 提交于 2019-12-23 16:24:55
问题 I have 4 gmails accounts, I am building a dashboard sort of web page, where i want to show number of unread mails in all of 4 mails. But When I auth with one account it doesn't displays the count of other accounts. Is there any method to keep multiple accounts signed in? I want output like; Mail 1: 10 unread Mails Mail 2: 9 unread mails so on.... 回答1: i think that you can do it on storing the Credential for each count, for example : if(Session["Credentials"]==null) List<UserCredential>

How to `insert` a `full` format message using the Gmail API?

我与影子孤独终老i 提交于 2019-12-23 12:18:35
问题 I've had success cloning a 'raw' formatted message by using get with format='raw' and re-inserting it just like this: params = {'userId':'me", 'id': msg_id, 'format':'raw'} mesg = service.users().messages().get(**params).execute() body = {'raw': mesg['raw']} service.users().messages().insert(userId='me', body=**body).execute() But I'm keen to do the same thing using the json format that get can alternatively return via format='full' . Something like this: params = {'userId':'me", 'id': msg_id

How to send GTLRGmail_Message with attachment

左心房为你撑大大i 提交于 2019-12-23 03:32:17
问题 After searching a while i have manage to send a email but without attachment as follows: NSString *messageString = @"From: \"From Email USer Name\" <fromEmail>\r\n"; messageString = [messageString stringByAppendingString:@"To: \"To Email User Name\" <ToEmail>\r\n"]; messageString = [messageString stringByAppendingString:@"Subject: New stuff\r\n"]; messageString = [messageString stringByAppendingString:@"Content-type: text/html;charset=iso-8859-1\r\n\r\n"]; messageString = [messageString

Sending an email with Gmail's API using only a token?

给你一囗甜甜゛ 提交于 2019-12-22 14:01:50
问题 I'm trying to using Google's API to send an email. I have a web application powered by AngularJS where the user signs in with their google account (via passport.js) using oauth2. A new access token is written to their account on my database. Their google user ID is also written to their account. I'd like the user to be able to send an email via an HTTP request using simply their user Id and access token. I'm using Postman to make some test requests, but I keep getting this error: { "error": {

Sending an email with Gmail's API using only a token?

筅森魡賤 提交于 2019-12-22 14:01:47
问题 I'm trying to using Google's API to send an email. I have a web application powered by AngularJS where the user signs in with their google account (via passport.js) using oauth2. A new access token is written to their account on my database. Their google user ID is also written to their account. I'd like the user to be able to send an email via an HTTP request using simply their user Id and access token. I'm using Postman to make some test requests, but I keep getting this error: { "error": {

Google GMail API service account to list e-mails from several accounts

丶灬走出姿态 提交于 2019-12-22 13:52:32
问题 I'm working on a CRM application where all the staff users have a GMail account which is under a same domain. I'm the admin of this domain. Before, I used a custom access for all GMail users in my CRM using IMAP in order to get all the e-mails sent and received by them. For that I asked their GMail passwords that are stored without any encryption in my DB (It's crappy I know). Now, I want to do the same work but with the Google GMail API, and I have some questions : -Can I achieve what I want

Gmail API limitations for getting mails

喜夏-厌秋 提交于 2019-12-22 12:19:53
问题 As I understand currently google's API provides 10 requests per second to its API (from their docs), and it looks to be far from enough for comfortable work with mail. I need to get all emails' headers (or at least senders and recipients). Is there anything better than waiting numberOfMails / 10 seconds? I'm currently accessing API from client side JavaScript application, I'm thinking of distributing API calls for the same user over a number of machines/applications, but's still unclear if

Gmail API is overwriting the custom Message-ID header while sending emails

橙三吉。 提交于 2019-12-22 12:13:40
问题 We are using the Gmail API to send emails on behalf of the users of our App. On the header of the emails we send via the Gmail API, we are setting a custom Message-ID. Nevertheless Gmail is overwriting the Message-ID we set with a different one . The following are some Message-IDs that we have tried: <8368110f-6ffc-46f8-8e67-7ebf0e1a1d83@domain> <4fb7a8b7013099c524f70906e009b46218461fff0b2dc0f8b794eb2df26e93d7@domain> Any idea why this ID overwriting is happening ? I would really appreciate

Find timestamp for hangout and chat messages retrieved with gmail api

我怕爱的太早我们不能终老 提交于 2019-12-22 04:36:34
问题 While fiddling with the Gmail API, I noticed that if I don't use any filters, the Users.messages: list method also returns messages sent and received through Google Hangout or Gmail Chat. Which is very nice. The json object for a Hangout message is structured like an email (with payload, headers etc), but the only header provided is the sender. There's no information about the time the message is sent. I've looked through all other Gmail API methods (threads, history...) but none of them