gmail

Does the Gmail API support using OAuth Service Accounts?

故事扮演 提交于 2019-12-01 06:11:08
问题 I am trying to use the Gmail API with the Python Google Client library. I have created a Service Account credential through the Google Developer Console. I am then attempting to use those credentials like sO: from oauth2client.client import SignedJwtAssertionCredentials client_email = '<sanitised>@developer.gserviceaccount.com' with open("foobar-<sanitised>.p12") as f: private_key = f.read() credentials = SignedJwtAssertionCredentials(client_email, private_key, 'https://www.googleapis.com

Python IMAP search using a subject encoded with utf-8

北慕城南 提交于 2019-12-01 06:07:02
问题 This question is related to question Python IMAP search using a subject encoded with iso-8859-1, but the reply given there is not working for me. I am doing the following IMAP search in python: typ, data = self.M.search("utf-8", "(SUBJECT %s)" % u"réception".encode("utf-8")) And I get the following exception: ... typ, data = self.M.search("utf-8", "(SUBJECT %s)" % u"réception".encode("utf-8")) File "/usr/local/python/2.7.2/lib/python2.7/imaplib.py", line 625, in search typ, dat = self._simple

Prefilling large volumes of body text in GMAIL compose getting a Request URI too long error

筅森魡賤 提交于 2019-12-01 05:37:24
问题 Hi guys this is a followup from the question: Prefilling gmail compose screen with HTML text Where I was building a google apps application - I can call a gmail compose message page from my application using the url: https://mail.google.com/a/domain/?view=cm&fs=1&tf=1&source=mailto&to=WHOEVER%40COMPANY.COM&su=SUBJECTHERE&cc=WHOEVER%40COMPANY.COM&bcc=WHOEVER%40COMPANY.COM&body=PREPOPULATEDBODY However when I try to pass in the body parameter a very long line of text eg as a reply message body

Sending HTML message through PEAR while using SMTP authentication returns an error

谁说胖子不能爱 提交于 2019-12-01 05:29:17
I'm trying to send an HTML message while using SMTP authentication to Gmail in PHP. Here is the script that I am using: require_once "Mail.php"; require_once 'Mail/mime.php'; $from = "Some Name <myemail@gmail.com>"; $to = "Other Name <otheremail@gmail.com>"; $subject = "This is a test"; $crlf = "\n"; $host = "ssl://smtp.gmail.com"; $port = "465"; $username = "myemail@gmail.com"; $password = "mypass"; $headers = array ('From' => $from, 'Return-Path' => $from, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'port' => $port, 'auth' => true, 'username' => $username,

PHPMailer $mail->From headers not working with gmail

我的梦境 提交于 2019-12-01 05:21:27
I'm using the following code to send a mail after a form submission with the PHP mailer class https://github.com/Synchro/PHPMailer . The mail sends and is received successfully. The only thing that isn't wokring is the following: $mail->From = $email; $email is the email that a user will enter on the form (it is set with a $_POST variable). I would like the email to appear that it's from the user who filled out the form, so I can hit reply and have it go to their email address. However, the "from" email address is being set as $mail->Username , i.e. the username from the gmail account that the

Google Contacts read only (OAuth 2.0)

孤街浪徒 提交于 2019-12-01 05:13:31
We're using OAuth 2.0 to access Gmail Contacts. Do you know if it is possible to request access (scope) in such a way that the authorization pop-up indicates that we need read only access. Right now the pop say says "Manage your contacts" - view and manage your Google Contacts. This "manage" part is discouraging to many users while all we need is to view them. So far we tried the following scopes but the pop-up is the same ("Manage contacts"): - https://www.google.com/m8/feeds/ - https://www-opensocial.googleusercontent.com/api/people Thanks, Piotr Yes, there is, just use https://www

Counting the number of Emails in the Gmail INBOX

北城余情 提交于 2019-12-01 05:12:06
问题 This is the code that counts the number of mails in the gmail inbox. Properties props = new Properties(); props.put("mail.pop3.host" , "pop.gmail.com"); props.put("mail.pop3.user" , "username"); props.put("mail.pop3.socketFactory" , 995 ); props.put("mail.pop3.socketFactory.class" , "javax.net.ssl.SSLSocketFactory" ); props.put("mail.pop3.port" , 995); Session session = Session.getDefaultInstance(props , new Authenticator() { @Override protected PasswordAuthentication

laravel Your connection is not private error in chrome

与世无争的帅哥 提交于 2019-12-01 05:09:57
I am using laravel 5.4 and I updated the .env file to be as follows: MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME=my gmail MAIL_PASSWORD=my password MAIL_ENCRYPTION=tls when I tried to test that I got the following message Attackers might be trying to steal your information from test.dev (for example, passwords, messages, or credit cards). Learn more NET::ERR_CERT_AUTHORITY_INVALID so I tried to return everything to the default but I still got the same message .. where is the problem? It is because your chrome version is 63. Now it is a force to use https. If you using

Email authentication (Gmail, Yahoo etc) — android [duplicate]

℡╲_俬逩灬. 提交于 2019-12-01 05:07:05
问题 This question already has answers here : How should I validate an e-mail address? (32 answers) Closed 6 years ago . I am pretty new to this topic, is that possible to authenticate all email id in one stretch. Actual need is i want to authenticate the email(gmail, yahoo etc) in my application, once the authenticate approves, it should continue to my application. It may be single sign on or whatever. Is this possible to do. Can anyone guide me on this topic. Thanks in advance 回答1: I'm not 100%

JavaMail API, Gmail-Auth and setFrom

依然范特西╮ 提交于 2019-12-01 05:07:02
for this app i'm following this example: http://pipoltek.blogspot.com/2008/02/sending-mail-using-gmail-smtp-server.html I can send emails, it looks good.....but i want to modify the sender email using this: MimeMessage msg = new MimeMessage(mailSession); msg.setFrom(new InternetAddress("baba-jaga@gmail.com")); baba-jaga@gmail.com is dummy E-Mail, is not mine :) When t use setFrom , i recive the email from this email, which i use to authenticate. Is the authentication the reason, which disable the setFrom method? I need to change the "from" email, because i want, that the recipient send me an