gmail-api

Error 10053 When Sending Large Attachments using Gmail API

别等时光非礼了梦想. 提交于 2020-01-10 05:30:08
问题 I'm trying to send emails of various sizes using the Gmail API and the functions below. Generally this works perfectly, however for attachments over around 10MB (which are rare but will happen) I recieve Errno 10053 which I think is because I timeout when sending the message including the large attachment. Is there a way around this by say, specifying size or increasing the timeout limit? There's reference to size in the Gmail API docs, but I'm struggling to understand how to use in Python or

Google Cloud Pub/Sub API - Push E-mail

强颜欢笑 提交于 2020-01-10 03:46:17
问题 I'm using node.js to create an app that gets a PUSH from Gmail each time an email is received, checks it against a third party database in a CRM and creates a new field in the CRM if the e-mail is contained there. I'm having trouble using Google's new Cloud Pub/Sub, which seems to be the only way to get push from Gmail without constant polling. I've gone through the instructions here: https://cloud.google.com/pubsub/prereqs but I don't understand how exactly this is supposed to work from an

how to use GMAIL API query filter for datetime

此生再无相见时 提交于 2020-01-10 02:03:14
问题 I am using GMAIL API over REST interface to read mails from gmail server, my problem is when I am using date filter by giving a date as 'after:2014/8/20 before:2014/8/22' then the mails starting from 2014/8/20 12.30 PM onwards are downloaded (ideally it should consider mails from 12.00 AM). Mails from night 12.00 AM till noon 12.30 PM are skipped. I think server is using PST time zone. Can I specify time in the filter? or is there a way to specify time zone so that I get all the mails. code

NSURLConnection initWithRequest is deprecated

落爺英雄遲暮 提交于 2020-01-09 19:08:33
问题 I am adopting the Gmail API in iOS and I am getting the warning: initWithRequest is deprecated in the following line: connection_ = [[connectionClass alloc] initWithRequest:request_ delegate:self startImmediately:NO]; The line is in the source file GTMHTTPFetcher.m of the API library. What is the substitute for the deprecated -initWithRequest: method? 回答1: It seems that the whole NSURLConnection API has been deprecated in iOS 9. Existing apps will continue to work, but new builds (linked

NSURLConnection initWithRequest is deprecated

廉价感情. 提交于 2020-01-09 19:05:13
问题 I am adopting the Gmail API in iOS and I am getting the warning: initWithRequest is deprecated in the following line: connection_ = [[connectionClass alloc] initWithRequest:request_ delegate:self startImmediately:NO]; The line is in the source file GTMHTTPFetcher.m of the API library. What is the substitute for the deprecated -initWithRequest: method? 回答1: It seems that the whole NSURLConnection API has been deprecated in iOS 9. Existing apps will continue to work, but new builds (linked

Gmail api Sending email 400 bad request

試著忘記壹切 提交于 2020-01-07 06:57:24
问题 i am trying to automate mail sending with the help of a google apps account Credentials and application settings (security, scopes) seem to be ok (with the same service and the same credential, i can fetch my inbox messages without any problem.) My apps has been authorized on the admin google console with the right creddential "a p12 key" and the scope "https://mail.google.com/" so my php code look like $credentials = new \Google_Auth_AssertionCredentials( $serviceEmail, array('https://mail

Gmail API on GAE: Correctly using discovery.build_from_document()

我们两清 提交于 2020-01-06 15:49:37
问题 I'm running a number of tasks on the GMail API and am getting the same error as described in this issue. To resolve it, I would like to implement the suggested solution. However I am not sure how to apply this to my code. My code currently looks as follows: class getLatest(webapp2.RequestHandler): def post(self): try: email = self.request.get('email') g = Credentials.get_by_id(email) REFRESH_TOKEN = g.refresh_token start_history_id = g.hid credentials = OAuth2Credentials(None, settings.CLIENT

Gmail API on GAE: Correctly using discovery.build_from_document()

可紊 提交于 2020-01-06 15:49:11
问题 I'm running a number of tasks on the GMail API and am getting the same error as described in this issue. To resolve it, I would like to implement the suggested solution. However I am not sure how to apply this to my code. My code currently looks as follows: class getLatest(webapp2.RequestHandler): def post(self): try: email = self.request.get('email') g = Credentials.get_by_id(email) REFRESH_TOKEN = g.refresh_token start_history_id = g.hid credentials = OAuth2Credentials(None, settings.CLIENT

Gmail API sender not sending multiple attachments

狂风中的少年 提交于 2020-01-06 14:52:13
问题 I am using Gmail API to send an email in JavaScript. It's working fine for text plus one attachment. But when I try to send two attachments, only the first one gets attached, and nothing for the other one. My code for building the message is: var nl = '\n'; var boundary = "__myapp__"; const messageParts = [ 'MIME-Version: 1.0', 'Content-Transfer-Encoding: 7bit', 'From: XXXX Support <XXXXX@XXXXX.XXXXX>', 'To: Moin <' + event.email + '>', 'subject: ' + utf8Subject, 'Content-Type: multipart

Users.threads.list not returning all pages/threads

☆樱花仙子☆ 提交于 2020-01-06 14:43:18
问题 Calling Users.threads.list on a label with 162 threads with maxResults=50 so there should be 4 pages. Third page doesn't have a nextPageToken (even when specifically requested in fields) so I can't get the last page. Also, the third page only returns 46 threads. Tried includeSpamTrash=true didn't fix it. Verified results through the in-page API tester at https://developers.google.com/gmail/api/v1/reference/users/threads/list. 来源: https://stackoverflow.com/questions/26460654/users-threads-list