Is it possible to interact with Gmail using AJAX (Javascript)? [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this questionI would like to build my own interface for gmail, by programatically interacting with the actual Gmail service and pipe all requests on my service to gmail itself.
The user would have to login to his or her gmail account, after which my app needs to be able to interact with the gmail service.
Is there an API available for Javascript that would allow me to do this?
Any other related feedback is appreciated as well. Thanks.
Update: one site that might 开发者_StackOverflow社区have done what I am trying to do would be otherinbox.com, unless they proxy all e-mail through their own servers (this is something I do not wish to do, as I want people to interact with gmail directly through a Javascript API).
If you can do everything you want as a browser plugin on top of Gmail, by monitoring and observing what goes on, you might want to take a look at this. It won't quite do what you're asking for, but it gets you somewhere along the path.
Gmailr
Unfortunately, you're probably going to need a server. Even if you could work around the cross-domain issues, Gmail's interface is basically built dynamically with JavaScript when the page loads. So the JavaScript function names will be changing on you literally all the time.
Just about everybody doing anything like what you're describing (we provide an alternative interface to Gmail as well at emailga) has gone this route. I know the OtherInbox guys as well, and they have a server component that uses the IMAP interface to do most of their magic.
i think you need to create a custom mail server which can connect to gmail via pop3 or imap or smtp. on the other hand i am sure that ajax requests cannot be cross domain requests, but the php can do this. so you must need a php file wich access to the gmail through pop3|imap|smtp or ajax. but only javascript cant do that.
Please look at Gmail API.
I think you can work with it, although, I haven't investigated it in depth.
hope it helps.
精彩评论