gmail

I cannot search sent emails in Gmail with Python

核能气质少年 提交于 2019-11-30 03:56:11
I am trying to search for messages in the Sent (actually i care for both) but I only get incoming messages. For the time being i have imap_conn.select() str_after = after.strftime('%d-%b-%Y') typ, msg_ids = imap_conn.search('UTF-8','SINCE',str_after) Which gives equivalent results with this imap_conn.select('INBOX') When I replace INBOX with ALL or SENT I get: command SEARCH illegal in state AUTH, only allowed in states SELECTED w-- Man, the error message is so misleading. What it's really saying is that you have tried to select an invalid folder name hence the search operation fails. To

Configure Flask-Mail to use GMail

╄→尐↘猪︶ㄣ 提交于 2019-11-30 03:49:31
When I try to send an email using Flask-Mail to Gmail's SMTP server using the settings below, I get [Errno -2] Name or service not known . How do I fix my configuration to send email with Gmail? from flask import Flask, render_template, redirect, url_for from flask_mail import Mail, Message app = Flask(__name__) app.config.update( MAIL_SERVER='smtp@gmail.com', MAIL_PORT=587, MAIL_USE_SSL=True, MAIL_USERNAME = 'ri******a@gmail.com', MAIL_PASSWORD = 'Ma*****fe' ) mail = Mail(app) @app.route('/send-mail/') def send_mail(): msg = mail.send_message( 'Send Mail tutorial!', sender='ri******a@gmail

Select mailbox “sent mail” or “all mail” in Ruby Net::IMAP

萝らか妹 提交于 2019-11-30 03:23:31
I'm trying to use Net::IMAP in Ruby to search all mail sent by me, but I'm having trouble selecting anything other than INBOX. imap.select('INBOX') works fine, but imap.select('Mail/sent-mail') as shown on the Net::IMAP documentation gives me "Unknown Mailbox". Incidentally, this is to be used with gmail. I also tried adding "in", "anywhere" to my imap.search(), but that didn't parse. Current code: imap.select('INBOX') now = Time.now.localtime - 1209600 #two weeks since = now.day.to_s() + "-" + Date::MONTHNAMES[now.month] + "-" + now.year.to_s() puts "since" puts since begin mail_ids = imap

Is it possible to use google web fonts in gmail

徘徊边缘 提交于 2019-11-30 03:22:56
问题 I want to use google web font "Over the Rainbow" when composing mail in gmail <link href='http://fonts.googleapis.com/css?family=Over+the+Rainbow&v2' rel='stylesheet' type='text/css'> Is it possible? <script type="text/javascript"> WebFontConfig = { google: { families: [ 'Over+the+Rainbow' ] } }; (function() { var wf = document.createElement('script'); wf.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js'; wf.type =

Parse Gmail with Python and mark all older than date as “read”

喜夏-厌秋 提交于 2019-11-30 03:01:21
Long story short, I created a new gmail account, and linked several other accounts to it (each with 1000s of messages), which I am importing. All imported messages arrive as unread, but I need them to appear as read. I have a little experience with python, but I've only used mail and imaplib modules for sending mail, not processing accounts. Is there a way to bulk process all items in an inbox, and simply mark messages older than a specified date as read? typ, data = M.search(None, '(BEFORE 01-Jan-2009)') for num in data[0].split(): M.store(num, '+FLAGS', '\\Seen') This is a slight

Script Sending mails with Gmail: Failed to authenticate on SMTP server

∥☆過路亽.° 提交于 2019-11-30 02:52:16
问题 I am having some hard time getting my PHP script to send emails with a SMTP Gmail account. I am using PHP and Symfony2 SwiftMailer, but it seems that the problem lies with my Gmail account configuration. In my logs, I end up with the following error message: "ERROR - Exception occurred while flushing email queue: Failed to authenticate on SMTP server with username "new.user.name@gmail.com" using 1 possible authenticators" Luckily, I had another Gmail account working with another application,

How to get google plus profile picture in c# MVC authentication

独自空忆成欢 提交于 2019-11-30 02:41:39
I'm developing a C# ASP.NET MVC 5 application that uses Google sign in as a default provider. The login functionality works ok and I can get the e-mail and name of the user. One thing that I need is to get the profile picture of the user. How can I achieve that? So far I using the default MVC auth "UseGoogleAuthentication". Microsoft.Owin.Security.Google.GoogleAuthenticationOptions a = new Microsoft.Owin.Security.Google.GoogleAuthenticationOptions(); var googleOption = new GoogleAuthenticationOptions() { Provider = new GoogleAuthenticationProvider() { OnAuthenticated = (context) => { var

sending an email from a C/C++ program in linux

我与影子孤独终老i 提交于 2019-11-30 02:16:11
I would like to send an email to my gmail account everytime my simulation ends. I have tried searching the web and found sendEmail but it is timing-out. If anyone could point me out to a package or link that they tried I would be thankful. Thanks You could invoke your local MTA directly using popen() and feed it RFC822-compliant text. #include <stdio.h> #include <string.h> #include <errno.h> int sendmail(const char *to, const char *from, const char *subject, const char *message) { int retval = -1; FILE *mailpipe = popen("/usr/lib/sendmail -t", "w"); if (mailpipe != NULL) { fprintf(mailpipe,

How does incoming mail notification on Gmail works?

天大地大妈咪最大 提交于 2019-11-30 01:22:47
问题 I'm wondering how it's implemented in Gmail, that every time you receive e-mail, the list of mails is automatically refreshed. It looks like the server is sending some kind of event to the browser, but how is it possible? Or maybe it’s simle: the browser ask the server for new messages every let’s say 2 seconds? But it would probably kill the performance… Anyone have some ideas? EDIT: OK, so if it's the simple answer, how do they manage performance? When I send an email from an other account

How to retrieve my Gmail messages using Gmail API?

ⅰ亾dé卋堺 提交于 2019-11-30 00:58:04
What I want to achieve: I'm using the Gmail API and basically I would like to connect to my GMail account to read my emails, of INBOX category, and get basic info for each message (title/subject, from , to , date , and the sender). Problems: I'm trying to adapt this Google sample, written in C#, to my own needs, I'm searching for a solution in C# or Vb.Net, no matter. (Be aware that Google shows different code examples for different user-countries, so the code of that webpage maybe will not be the same for every one, that Google's logic really sucks.) The problems I have with the code below,