gmail-api

Gmail new email notification

我们两清 提交于 2020-01-14 03:36:09
问题 I've been doing some research into how to get new email notification from gmail. From what I am reading it doesn't really seem to be possible. Gmail API has no webhooks or anything that would allow to get new email notification. Also IMAP api doesn't seem to be able to, at least from what I'm reading, documentation is rather vague. So, I guess I am asking is there a way to achieve receiving notification when new email arrives so we can process it when its received or is polling for new emails

Integrating gmail connection in Firebase project

醉酒当歌 提交于 2020-01-13 19:42:11
问题 I developped an application that uses gmail api to get all the mails from the user. Then I divided this app in a sample (almost empty) and a fragment that does everything, so I can later integrate my fragment easily in my team's project's settings. Now that my fragment is in the other project, the gmail connexion doesn't work and gives me these errors : E/Async Task: com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAuthIOException E/Google log in: failed I think this error

Mark as read mail method

夙愿已清 提交于 2020-01-13 09:43:11
问题 How do I mark mail as read using Gmail API? I got the thread of email Thread thread = service.users().threads().get(userId, message.getThreadId()).execute(); but it does not have method markRead like gmail API site says it should. 回答1: use either threads.modify() or messages.modify() (depending on scope of what you want to do) and removeLabelId of "UNREAD". https://developers.google.com/gmail/api/v1/reference/users/threads/modify 回答2: As I arrived here in search for this answer in C# here is

iOS :GMail API - Send Attachments with email

夙愿已清 提交于 2020-01-13 06:22:51
问题 I am able to successfully able to send emails without attachments. However, when I try to upload attachments using GTLUploadParamaters, I am getting a 501 error. I have tried adding the NSData of an attachment from the Photo Library, as well as just sending the URL of an image. In both cases I got the same error. // Create the message GTLGmailMessage *message = [[GTLGmailMessage alloc]init]; message.raw = [self getFormattedRawMessageForMail:mail]; if(!self.gmailService) { self.gmailService =

iOS :GMail API - Send Attachments with email

别说谁变了你拦得住时间么 提交于 2020-01-13 06:22:30
问题 I am able to successfully able to send emails without attachments. However, when I try to upload attachments using GTLUploadParamaters, I am getting a 501 error. I have tried adding the NSData of an attachment from the Photo Library, as well as just sending the URL of an image. In both cases I got the same error. // Create the message GTLGmailMessage *message = [[GTLGmailMessage alloc]init]; message.raw = [self getFormattedRawMessageForMail:mail]; if(!self.gmailService) { self.gmailService =

How to tell if an email sent via Gmail REST API has bounced?

喜你入骨 提交于 2020-01-12 04:56:05
问题 I'm sending emails via Gmail API and would like to know when the messages bounce. How can I do this? As I understand it, bounced emails usually contain some sort of header indicating a bounce such as: X-Failed-Recipients: zzzzzzzzzasdfasdfadfa@gmail.com However, there doesn't seem to always be a header indicating what original messageID it was that bounced. I was thinking of the following plan, but there are so many holes that I think I must be approaching this wrong. Send email (to a failed

Get direct link to gmail message via Google API

五迷三道 提交于 2020-01-11 11:42:26
问题 Is it possible to get the link to the message using Google API? Can message id be translated somehow to direct link which can be opened in browser? 回答1: You can try with URL https://mail.google.com/mail/#inbox/messageId . But you should have access to this message. But this URL is generated by Gmail UI not with API. So, you have to create the above URL in your program 来源: https://stackoverflow.com/questions/29415495/get-direct-link-to-gmail-message-via-google-api

Get direct link to gmail message via Google API

落爺英雄遲暮 提交于 2020-01-11 11:42:11
问题 Is it possible to get the link to the message using Google API? Can message id be translated somehow to direct link which can be opened in browser? 回答1: You can try with URL https://mail.google.com/mail/#inbox/messageId . But you should have access to this message. But this URL is generated by Gmail UI not with API. So, you have to create the above URL in your program 来源: https://stackoverflow.com/questions/29415495/get-direct-link-to-gmail-message-via-google-api

Get direct link to gmail message via Google API

给你一囗甜甜゛ 提交于 2020-01-11 11:41:59
问题 Is it possible to get the link to the message using Google API? Can message id be translated somehow to direct link which can be opened in browser? 回答1: You can try with URL https://mail.google.com/mail/#inbox/messageId . But you should have access to this message. But this URL is generated by Gmail UI not with API. So, you have to create the above URL in your program 来源: https://stackoverflow.com/questions/29415495/get-direct-link-to-gmail-message-via-google-api

GMail API : unable to add an attachment in a draft

旧时模样 提交于 2020-01-11 07:45:08
问题 I am able to create simple html-only drafts using the GMail API. But when I try to upload attachments it fails with the following error : { "code" : 500, "errors" : [ { "domain" : "global", "message" : "Backend Error", "reason" : "backendError" } ], "message" : "Backend Error" } Here is my code, can anyone help me ? Properties props = new Properties(); Session session = Session.getDefaultInstance(props, null); MimeMessage email = new MimeMessage(session); InternetAddress tAddress = new