gmail

Count number of emails in gmail using IMAP

孤街醉人 提交于 2019-11-30 06:59:36
问题 Can anyone tell me how I can get the number of unread items in my inbox from gmail using imap or something else and display it in a label in C# WinForms? I tried using atom feeds, but never could get it Here is what I want to look like, if it helps: 回答1: You probably want to find all messages with the UNSEEN flag set. Imap imap = new Imap(); /* connect, login, etc. */ imap.Connect(...); /* fill login and select folder code */ List<long> unseenList = imap.SearchFlag(Flag.Unseen); // now you

Laravel - Connection could not be established with host smtp.gmail.com [ #0]

戏子无情 提交于 2019-11-30 06:43:40
I'm trying to send an email from Gmail using Laravel from localhost. I'm getting this error: Connection could not be established with host smtp.gmail.com [ #0] I'm using ssl with port 465. I also tried 587 but it didn't work. I also tried this but it didn't work. I found a lot of people suffering from the same problems, but the solutions I found didn't work. I had the same error: Connection could not be established with host smtp.gmail.com [ #0] and followed the steps outlined here: https://github.com/swiftmailer/swiftmailer/issues/544 . Try adding the following lines to

using core php mail() to send via gmail SMTP

喜夏-厌秋 提交于 2019-11-30 06:40:29
Is it possible to send mail in core php via gmail smtp without using any external class? Pierre-Olivier I don't think it is possible because you need to perform an authentification. Also, you need to connect via an SSL socket, I don't know if the stock mail() function support this. If you are willing to use the Pear Mail package, you might want to take a look at this: Send email using the GMail SMTP server from a PHP page There's a lot of miscommunication about this. It is 100% possible to send emails using gmail via PHP's simple "mail()" command. And it is 100% easy. Install SSMTP: sudo apt

How does GMail implement Comet?

孤人 提交于 2019-11-30 06:23:32
问题 With the help of HttpWatch, I tried to figure out how GMail implements Comet. I login in to GMail with two accounts, one in IE and the other in Firefox. Chatting in GTalk in GMail with some magic words like "WASSUP". Then, I logoff both GMail accounts, filter any http content without "WASSUP" string. The result shows which HTTP request is the streaming channel. (Note: I have to logoff. Otherwise, never-ending HTTP would not show content in HttpWatch.) The result is interesting. The URL for

Reading the full email from GMail using JavaMail

纵饮孤独 提交于 2019-11-30 05:50:28
I am making use of javamail and I am having trouble getting the HTML from my gmail emails. I have the following: Session session = Session.getDefaultInstance(props, null); Store store = session.getStore("imaps"); store.connect("imap.gmail.com", "myemail@gmail.com", "password"); System.out.println(store); Folder inbox = store.getFolder("Inbox"); inbox.open(Folder.READ_ONLY); Message messages[] = inbox.getMessages(); for(Message message:messages) { System.out.println(message); // com.sun.mail.imap.IMAPInputStream@cec0c5 The above all works fine but I can't print or get the actual HTML or Text

Is it possible to get Gmail oauth or xauth tokens with OmniAuth?

风流意气都作罢 提交于 2019-11-30 05:45:44
问题 I want to get oauth or xauth tokens from GMail to use with gmail-oauth. I'm thinking of using OmniAuth but it seems not to support GMail yet, which means that with stock OmniAuth is impossible. Is that correct? Am I missing something? 回答1: Omniauth has support for both OAuth and OAuth2, which will both allow you to authenticate a google account. Here are all of the strategies you can use via omniauth: https://github.com/intridea/omniauth/wiki/List-of-Strategies Here are the two google OAuth

Problem deleting emails in gmail using imaplib

柔情痞子 提交于 2019-11-30 05:43:31
问题 I try to remove message from inbox folder and all alright, but when i switched to All Mail folder the removing does not work. expunge() method returns ('OK', [None]) and message was not removed: >>>import imaplib >>>server = imaplib.IMAP4_SSL('imap.gmail.com','993') >>>server.login('likvidator89@gmail.com','Password') >>>server.select('inbox') >>>for i in server.search(None,'all')[1][0].split(): ... print i+"\n"+server.fetch(i,'(BODY[HEADER.FIELDS (Subject)])')[1][0][1] ... # that how i know

How to get gmail user's contacts?

自作多情 提交于 2019-11-30 05:42:34
问题 I need to retrieve the email addresses that the user has stored in his gmail account. In my app, the user can now decide to invite a friend of him. I want that the application (if the user tell me "ok") presents a list of the user's contacts email addresses stored in gmail, among which he can choose one or more... I know that exists Authentication and Authorization for Google APIs". Is it the right way? And, how to use them in Android? 回答1: I hope this will help for someone like me, because I

Reading Atom feed of gmail account from C#

旧街凉风 提交于 2019-11-30 05:33:42
I have a project that will send an email with certain data to a gmail account. I think that it will probably be easier to read the Atom feed rather than connect through POP. The url that I should be using according to Google is: https://gmail.google.com/gmail/feed/atom The question/problem is: how do I authenticate the email account I want to see? If I do it in Firefox, it uses the cookies. I'm also uncertain how exactly to "download" the XML file that this request should return (I believe the proper term is stream). Edit 1: I am using .Net 3.5. This is what I used in Vb.net: objClient

Create gmail, facebook and twitter account through API? [closed]

拥有回忆 提交于 2019-11-30 05:32:40
问题 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 6 years ago . Is it possible to create gmail, facebook and twitter account through API? 回答1: Short answer: No. 回答2: Well for Google Apps you can sync a user directory (via LDAP) using Google Apps Directory Sync. This will provision, modify and de-provision any number of accounts without CAPTCHA verification. You will be