gmail

Search utf-8 string with Gmail X-GM-RAW IMAP command

烂漫一生 提交于 2019-12-06 07:19:52
Gmail's imap extension command X-GM-RAW allows me to perform a search if I use a ascii query string. If utf-8 chars are used in the query, the imap returns bad response. https://developers.google.com/google-apps/gmail/imap_extensions#extension_of_the_search_command_x-gm-raw How should the utf-8 input string be encoded so that X-GM-RAW search will work fine. I do not want to loose the flexibility to search specific field like "subject" or "rfc833msgid" Thanks Specify CHARSET UTF-8 and send the UTF-8 search term in a literal. For example, to search for 你好, which is 6 bytes long when encoded in

Invalid scope error when trying to access gmail api

为君一笑 提交于 2019-12-06 07:18:20
问题 400. That’s an error. Error: invalid_scope You don't have permission to access some scopes. Your project is trying to access scopes that need to go through the verification process. {invalid = [https:// mail.google.com/]} If you need to use one of these scopes, submit a verification request. This is the error that I am getting when I flowed the tutorial in this link: https://developers.google.com/gmail/api/quickstart/js In the link they asked me to access webserver via python but I am using

Can't send emails with pyramid_mailer and gmail

拟墨画扇 提交于 2019-12-06 07:12:28
问题 I am trying to send emails from my pyramid website with my gmail smtp and the pyramid_mailer package. First of all, if anyone has another suggestion for an email solution, please let me know! I added the following to my dev.ini: mail.host = smtp.gmail.com mail.username = user@gmail.com mail.password = password mail.port = 465 mail.ssl = True And then I'm sending the message like so: config.registry['mailer'] = Mailer.from_settings(settings) and later... mailer = request.registry['mailer']

How can I implement a gmail-style label chooser?

 ̄綄美尐妖づ 提交于 2019-12-06 07:06:36
问题 What's the easiest way to implement (something like) Gmail's interface for labeling messages? Does any javascript library have a widget like this? http://img294.imageshack.us/img294/7097/36698396.png Behavior: Click a label in the dropdown to immediately label the message. Check multiple labels and then "Apply" to add multiple labels (not sure I like the "Apply" requirement...) Type in the box to narrow down your list of labels. If you narrow it down to 1, pressing enter applies that label.

IMAP access to Gmail inbox with XOAUTH

耗尽温柔 提交于 2019-12-06 07:01:26
问题 I'm following the example, I already have authorized my application (=obtained the access token) but trying to access the inbox results in this: 21:14.12 > NDIB1 AUTHENTICATE XOAUTH 21:14.17 < + 21:14.17 write literal size 480 21:14.74 < NDIB1 NO [ALERT] Invalid credentials (Failure) 21:14.74 NO response: [ALERT] Invalid credentials (Failure) This is the code: import xoauth import oauth2 as oauth import imaplib consumer = oauth.Consumer('anonymous', 'anonymous') access_token = oauth.Token(my

Programatically adding “New Custom Field” To Google Contacts using Google contact API

别说谁变了你拦得住时间么 提交于 2019-12-06 06:27:40
问题 How to create new "Custom Field into Google Contact using Google Contact API (c#)? I used: ExtendedProperty obj_ExtendedProperty = new ExtendedProperty(); obj_ExtendedProperty.Name = "Department"; obj_ExtendedProperty.Value = "Sales"; ContactEntry.ExtendedProperties.Add(obj_ExtendedProperty); Thanx 回答1: Have a look to ContactEntry class and how to update it. RETRIEVE your contact: RequestSettings rs = new RequestSettings(this.ApplicationName, this.userName,this.passWord); ContactsRequest cr =

Automatically login to Gmail using a WebView?

耗尽温柔 提交于 2019-12-06 06:25:10
I'd like to use the user's Gmail username and password to automatically login to Gmail inside a WebView . Is there any existing code how to do this, as I'm having trouble with it (which hidden fields need to be posted, getting/re-injecting the cookie). I have tried to simply fill in the username/password-fields using JavaScript, which works, but on submitting the login-form (using JavaScript again), the WebView asks the users whether he/she wants the password to be saved, which I need to avoid (to make it truly automatic). Thanks, Nick WebSettings mWebSettings = mWebView.getSettings();

Send mail via gmail with PowerShell V4

无人久伴 提交于 2019-12-06 06:24:19
I have been using this PowerShell script to send my an email to me when opened. $EmailFrom = "notifications@somedomain.com" $EmailTo = "anything@gmail.com" $Subject = "sample subject" $Body = "sample body" $SMTPServer = "smtp.gmail.com" $SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587) $SMTPClient.EnableSsl = $true $SMTPClient.Credentials = New-Object System.Net.NetworkCredential("YOURUSERNAME", "YOURPASSWORD"); $SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body) I changed the $EmailTo to my email address, and the YOURUSERNAME / YOURPASSWORD to my correct login information. I

failedPrecondition error when authenticating with service account to Google API

旧时模样 提交于 2019-12-06 06:20:27
问题 I'm trying to fetch a given email from my own inbox (as project owner) using the Google API 2.0.0 RC4 for PHP. I have a project setup, a downloaded authentication file in JSON format and I have enabled the gmail API in the Google Developers Console. But when I run the following code I get a "Bad Request" error with reason "failedPrecondition". Now this leads me to believe that there is something wrong with the access rights, but I can't figure out what I need to do here. Code: <?php require

GCP Authentication: RefreshError

南楼画角 提交于 2019-12-06 06:13:33
问题 In order to round-trip test mail sending code in our GCP backend I am sending an email to a GMail inbox and attempting to verify its arrival. The current mechanism for authentication to the GMail API is fairly standard, pasted from the GMail API documentation and embedded in a function: def authenticate(): """Authenticates to the Gmail API using data in credentials.json, returning the service instance for use in queries etc.""" store = file.Storage('token.json') creds = store.get() if not