gmail-api

Set user signature with gmail API - How to

萝らか妹 提交于 2019-12-24 06:33:07
问题 Has someone already use gmail API to create signature for a user with apps script ? I've seen this link : "https://developers.google.com/gmail/api/v1/reference/users/settings/sendAs" But I don't know how to use it. Thanks for your responses JPA 回答1: This is possible using the Gmail advanced service: https://developers.google.com/apps-script/advanced/gmail function setSignature() { var newSig = Gmail.newSendAs(); newSig.signature = "MY NEW SIGNATURE!" Gmail.Users.Settings.SendAs.patch(newSig,

Gmail API error 429 rateLimitExceeded even where is no any activity

与世无争的帅哥 提交于 2019-12-24 06:22:47
问题 I have a NodeJS application that integrate with the Gmail API. When I try to access the Gmail API, I get this error: { "error": { "errors": [ { "domain": "usageLimits", "reason": "rateLimitExceeded", "message": "User-rate limit exceeded. Retry after 2017-03-26T18:15:52.102Z" } ], "code": 429, "message": "User-rate limit exceeded. Retry after 2017-03-26T18:15:52.102Z" } } I was wait for period, and try again, and got same error. I was wait for few hours, saw that is no activity in the API

Gmail API error 429 rateLimitExceeded even where is no any activity

荒凉一梦 提交于 2019-12-24 06:22:09
问题 I have a NodeJS application that integrate with the Gmail API. When I try to access the Gmail API, I get this error: { "error": { "errors": [ { "domain": "usageLimits", "reason": "rateLimitExceeded", "message": "User-rate limit exceeded. Retry after 2017-03-26T18:15:52.102Z" } ], "code": 429, "message": "User-rate limit exceeded. Retry after 2017-03-26T18:15:52.102Z" } } I was wait for period, and try again, and got same error. I was wait for few hours, saw that is no activity in the API

Email with attachment is not going properly with gmail api

*爱你&永不变心* 提交于 2019-12-24 06:04:34
问题 This is the following piece of code I have written in node.js for sending email with attachment using gmail api: And I am using request-promise module of node js to send request to that api. let user = await db.model('User').findOne({ _id: userId }); let filepath = fs.readFileSync(req.file.path).toString('base64'); // let filepath = fs.readFileSync(req.file.path); let from = user.crmOptions.email; let raw = [ 'Content-Type: multipart/mixed; boundary="boundary_mail"\r\n', 'MIME-Version: 1.0\r

gmail api html inline styles are not applying

瘦欲@ 提交于 2019-12-24 03:58:09
问题 I'm using gmail api and I'm trying to send the following code as mail For ex: I'm sending this <tr> <td style="font-family:Arial, Helvetica, sans-serif; font-size:9px;"> <a>Buy what you wish & Get Flat 5% off Use: HOLIDAY5</a> </td> </tr> and in the mail I'm receiving this <tr> <td> <a>Buy what you wish & Get Flat 5% off Use: HOLIDAY5</a> </td> </tr> all my inline styles are gone my post request is var from= 'From: '+name+' <'+email+'>\r\n'; var to='To: Me '+' <'+to+'>\r\n'; var subject=

drafts.create in objective-c using GTLQueryGmail

元气小坏坏 提交于 2019-12-24 02:44:08
问题 I seem to be confused on how to use GTMMIMEDocument.h to set the raw message data for a new draft. In the example I'll post below I'm trying to set the headers for To, From and Subject but they seem to end up in the message body data instead of with the other headers. Any help on what I'm doing wrong is much appreciated. Thanks. Query method: //message body to save NSData *messageBody = [self.messagebox.text dataUsingEncoding:NSUTF8StringEncoding]; //create mimemessage GTMMIMEDocument *email

GMail API retrieve From, To, etc. from a message?

岁酱吖の 提交于 2019-12-24 02:39:15
问题 How I can do to retrieve, from, to, subject, etc. from a message with this code ? Actually I can retrive list of message in a folder (label) but i want to retrieve fron, to, sender, etc. to display in a grid Private Sub LoadMailGrid(ByVal FolderName As String) Dim request As Google.Apis.Gmail.v1.UsersResource.MessagesResource.ListRequest = myGMailService.Users.Messages.List("xxxxxxx@gmail.com") request.Q = "label: " + folderName Dim messagesList As ListMessagesResponse = request.Execute() Dim

Impersonating list of users with Google Service Account

依然范特西╮ 提交于 2019-12-24 01:54:18
问题 According to the docs, Google Apps domain administrators can grant service accounts domain-wide authority to access user data on behalf of users in the domain. My understating is this gives service account authority to access data for all users inside the domain. Is there a way to restrict which users service account has access to? For example, an application that uses Google Calendar API to view events from the calendars of specific list of users in a Google Apps domain. Can google apps

TypeError: Cannot read property 'gmail' of undefined

大城市里の小女人 提交于 2019-12-23 23:17:46
问题 let fs = require('fs'); let google = require('googleapis'); getMessage(userId, messageId, callback) { let gmail = this.getGmailService(); var request = google.client.gmail.users.messages.get({ 'userId': userId, 'id': messageId }); request.execute(callback); } when I call this method from a spec getMessage('abcd123987@gmail.com', '15934550ay626ud09') it spits out the following error TypeError: Cannot read property 'gmail' of undefined any comments/suggestions? 回答1: There are 3 options: 1. You

Gmail REST API - Mark message as read

天大地大妈咪最大 提交于 2019-12-23 21:07:58
问题 I am trying to use the Gmail REST APIs to mark a message as read. $('#markGmailRead').click(function(){ var request = $.ajax({ type: 'POST', dataType: 'json', headers: { "Authorization": "Bearer <<ACCESS KEY>>", "Content-Type": "application/json"}, url: 'https://www.googleapis.com/gmail/v1/users/me/messages/<<MESSAGEID>>/modify', data: {"addLabelIds": ["UNREAD"]} }) request.done(function(data){ // when the Deferred is resolved. console.log(data); }) request.fail(function(){ // when the