I have an html file on my computer that takes an email address (gmail) and a password as input. I want to use javascript or python to log into the gmail acount with the given email address and send a message to another email address. How would I do this? Either javascript or python is fine.
Asked
Active
Viewed 540 times
-1
-
Yikes! I sure hope you have some solid security in place...sounds like an easy way to get access to people's email accounts. – Ethan Brown Sep 17 '12 at 22:54
-
2http://docs.python.org/library/email-examples.html – Ray Cheng Sep 17 '12 at 22:56
-
It's too general a question, mixing too many things. Do the tutorial just linked. – Paul Collingwood Sep 17 '12 at 23:03
1 Answers
2
"Gmail supports the standard IMAP and SMTP protocols for accessing and sending e-mail messages. The Gmail IMAP and SMTP servers have been extended to support authorization via the industry-standard OAuth 2.0 protocol."
So it looks like with an OAuth STMP/IMAP Javascript library you should be able to make this work. See this SO article for an example: Connecting to the Gmail IMAP API in javascript/node.js
Another option is to take a look at the Gmailr API.
While this is not going to be a plug-and-play solution for you, it's the course that most of the early 3rd party gmail extenders apparently used.