gmail-api

Using statement for Base64UrlEncode [closed]

[亡魂溺海] 提交于 2019-12-07 09:55:21
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I am trying to send an email through code, and I ran into a roadblock. I was working off of this when Base64UrlEncode showed up red. I have the same using statements in my code. using System; using System.IO; using System.Net.Mail; using System.Collections.Generic; using System.Configuration; using System.Linq;

Read mails again and again from gmail using JavaMail Api in java

為{幸葍}努か 提交于 2019-12-07 07:36:42
问题 I am using JavaMail Api to read mails from gmail account. But problem is that I can read it only once. Is there any way to read the mails again and again??? My Java Code is : import java.util.Properties; import javax.mail.BodyPart; import javax.mail.Folder; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Multipart; import javax.mail.NoSuchProviderException; import javax.mail.Session; import javax.mail.Store; public class Main { // main function. Project run

In what order does the Gmail API return messages when calling “Users.messages: list”

前提是你 提交于 2019-12-07 05:49:37
问题 According to the Gmail API reference, Users.messages: list "[lists] the messages in the user's mailbox". In my observation, the messages are returned in descending order by data. Is this a correct assumption? Basically I want to be able to process a user's inbox after a couple of days without reprocessing messages I have already processed. I would do that by stopping once I stumble upon an email I have seen before. Using the history doesn't work reliable, since it is documented that history

Delphi - Indy - saving GMail draft

断了今生、忘了曾经 提交于 2019-12-07 04:01:09
问题 I've been using Indy under Delphi to send message via a gmail account, using the TIdSMTP and TIdMessage components. This works absolutely fine. However, my client has requested to save the message to the DRAFTS folder to allow him to make changes to the (programatically created) message before actually sending it. GMail API is supposed to support this, but the provided examples are not in Delphi/Indy formats... I'm looking for minimal programming changes so I'd like to know if it is possible

Can I get a URL link to a Gmail draft using the Gmail API?

爷,独闯天下 提交于 2019-12-07 02:49:23
问题 The new Gmail API allows us to create and view drafts, but is there a way to get a URL link to view the draft? I can manually create the link using the draft's ThreadId with something like this: https://mail.google.com/mail/u/0/#drafts?compose={ThreadId} But that is somewhat fragile if Google decides to change how those URLs are structured. I also don't know if the URL will be different for people in other countries. The 0 will also change depending on how many accounts you are logged into in

Sending email with signature using Gmail API

点点圈 提交于 2019-12-06 18:24:40
问题 I got the Gmail Rest API sending part working but the e-mail doesn't include the signature and in recipient's inbox the 'from' label is sender's user id not the name of the user. This is in php. $mime = new Mail_mime(); $mime->setFrom("ABCD"); //This doesn't work.... $mime->setSubject('Testing'); $mime->setTXTBody('This is a demo mail'); $mime->addTo('a@a.com'); $message_body = $mime->getMessage(); $encodeMessage = base64url_encode($message_body); $message = new Google_Service_Gmail_Message()

Not authorized to request the scopes - Google OAuth2 for devices

别等时光非礼了梦想. 提交于 2019-12-06 16:54:44
I've recently been working on accessing the gmail API from a python script. As the script needs to run on a server, without any form of web browser, I've had to implement the OAuth for Devices flow, as detailed at https://developers.google.com/accounts/docs/OAuth2ForDevices This has gone just fine, as I've been testing with the "profile" scope, I've been getting access tokens as expected. However, to switch over to the the actual token that my script needs, as I need to be authorised to write to the user's email, I've tried running my script with the scope www.googleapis.com/auth/gmail.compose

How do we add new button to gmail compose bar in chrome extension? Is it through javascript or some gmail apis? [closed]

旧城冷巷雨未停 提交于 2019-12-06 16:08:41
Closed . This question needs to be more focused . It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post . Closed 2 years ago . I am trying to come up with a chrome extension to add some functionality to gmail. I have been using any.do and wanted to understand how can we do something similar? Do we inject our new div element in the DOM or are there any gmail apis through which I can add a new button and define action listener? I offer to you to use in this Libraries: InboxSdk - high level JavaScript

GMail API: Fastest way to get the oldest email in inbox

若如初见. 提交于 2019-12-06 13:47:16
I want to get the oldest email in GMail inbox. How can I do that with the minimum number of API calls? One way to do it could be to get the total number of emails from Users:getProfile API and then use User.messages:list API to get the last page using " pageToken " query parameter by using the formula pageToken = totalMessages/50 to get the list of messages from the last page of my inbox and then using the mid of the last message in the list to fetch the oldest email. I am just wondering if there is a better way to do this? I could not figure out other ways to do it from the documentation. Any

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

谁说我不能喝 提交于 2019-12-06 11:53:26
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": { "errors": [ { "domain": "global", "reason": "insufficientPermissions", "message": "Insufficient