I have developed web application in node.js, and now I want to fetch email(s) from gmail and store in my application database. I have read/checked mail-listener2, but it give me some error about authentication. I have raised issue for that, but I am still looking for a trusted library like this. Does anybody worked with this library, or any other solution for the same? In short I am looking for a code/sample/library which is fetch email(s) (including attachment and header detail (I need uniqueid/threadid of email, so I can make a ticketing solution) from G Mail account.
Thanks
Related
I'm building a CRM that has individual contacts arrive through a contact page on the main website. Each contact needs to be emailed individually and the application will need to display the email correspondence. Essentially a client of Gmail.
I'm having a very difficult time tracking down a good starting point for this problem, and I was curious if any one else has given this a try, perhaps using the Gmail API.
Thanks!
new to programming on the web so bear with me.
I've figured out that OAuth2.0 (the authorization protocol used by Gmail) is used for applications where Site A is given permission to information in Site B (in this case Gmail) by User X.
I am trying to create a website that updates when I receive an email from a specific sender. So, I am not using any of my website users' email information. I'm only using my own. I cannot seem to figure out (or even understand at a high level) how to permanently give my website access to my gmail account without doing some kind of user authentication on myself. What is the high-level process for giving my website this permanent authentication?
Let me know if I can make this clearer. Thank you in advance!
I've never done what you are trying to do, but you may find some useful answers here :)
Getting e-mail ID of sender while fetching mails from Gmail
I hope this helps if not I'm sorry. :)
UPDATE:
After reading that link a little bit more there are parts of it where they are getting the sender. You can always write a code to compare the sender by implementing what you need from that link. :)
In our website, we need to achieve a seemingly simple task: Enable the user to send a specific text to all or some of his/her Gmail contacts (including contact selection).
We don't actually need the contact data itself. We prefer some kind of "Gmail Plugin" (if there is one) that asks the user to login and does all the work. Alas, we couldn't find any.
We did find several different Google APIs related to this task. Some of them seem to give us contacts data. Others seem to handle sending email:
There is "Contacts API" under
https://developers.google.com/google-apps/contacts/v3/...
There is "Contacts Service" under
https://developers.google.com/apps-script/reference/contacts/...
There is "Gmail Service" under
https://developers.google.com/apps-script/reference/gmail/...
There is "Gmail Platform Integration" under
https://developers.google.com/gmail/...
Each of the above looks different and there seems to be much overlapping between them.
So what is the recommended method to achieve our original task? Is there a plugin that does it all? If not - should we use separate APIs for getting the contacts data and sending the emails, or are there Google APIs that combine both sub-tasks? In case those are separate tasks - is it possible to email via Gmail, or are there other recommended services for the email sending part?
To directly answer your question: you must use the first API you pointed, Contacts API under https://developers.google.com/google-apps/contacts/v3/.
Basically, you want to use the Google Contacts API with OAuth2 authentication in your website: user will be prompted by Google to allow your website to read user contacts.
First, read a bit about OAuth2 authentication flows here: http://alexbilbie.com/2013/02/a-guide-to-oauth-2-grants/
Second step: register your app on Google Console and get your key/pass for the Contacts API (you'll need contacts.readonly permission): https://console.developers.google.com
Then, as you'll use the OAuth2 for Web Servers, check this Google documentation: https://developers.google.com/accounts/docs/OAuth2WebServer
Alternatively, you can use third part libraries to easily import contacts to your website. There are free libraries, like PHP OpenInviter.org, Ruby OmniAuth gem, and paid alternatives, like CloudSponge.com (multi-language).
Disclaimer: I work for CloudSponge.com.
You could achieve this as you say with Google APIs and a Chrome Extension for example.
The user can add a Chrome Extension from the Chrome Webstore. The Extension will provide the user with a user interface to allow them to compose their message and send to the selected contacts.
The users contacts can be retrieved with the Google Contacts API.
The message can be sent to the selected contacts with the Gmail API.
There is a lot of documentation and examples for all of the above which together will give you what you want.
Depending on how much use this is going to get, you could use a contextual gadget which is browser agnostic - but visible in all emails in Gmail.
This is wrong the idea is to post the text to buffer a and submit pointer to array on buffet a and copy it to class b pointer a 0 than release the array and buffer so new allocation can be done
This maybe very noob and unworthy of stackoverflow.com, but nonetheless here goes:
I'm trying to write a custom application that syncs my Google data (emails, calendar and contacts) to the desktop (I know that there are several tools that let you do that, but curiosity only killed the cat!!).
I know that m.google.com is the sync sever I need to use. I've gone through [MS-ASHTTP].pdf, and got all the protocol information down.
Now, using either the cURL command-line or a tool (in Windows) such as Fiddler (http://www.fiddler2.com/), I'm unable to make valid ActiveSync requests to m.google.com. Moreover the URI /Microsoft-Server-ActiveSync doesn't exist on m.google.com, and searching Google turned up nothing for me. Need help!!!
Connecting to Google using ActiveSync should work (I have an Android app - Corporate Addressbook that does that successfully)
Use the following URL
https://m.google.com/Microsoft-Server-ActiveSync?User=xyz#gmail.com&DeviceId=1234512345&DeviceType=Android&Cmd=xxxxx
Edit the email address and the command you are sending. Also you will need to send the auth string in the header
I have a blog post that should help.
Is there a way I can create an addin for my Gmail account? Is GreaseMonkey the only real way?
I use Gmail for customer service, and I'd like to create a tool that looks up the customer and preps a response to them based upon who it is in my database... instead of looking by hand for the client and typing it out.
You can add gadgets (same as iGoogle and wave) and add them to the side bar in GMail, but you will not have access to the e-mails themselves. You could create small lookup forms and such, though.
I don't see how else you could do it. You won't be able to run your own app on Google's backend, so that leaves the client (with javascript and something like GreaseMonkey) and your server (perhaps communicating with the client via AJAX).