-1

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.

1 Answers1

2

From Google:

"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.

Community
  • 1
  • 1
xelco52
  • 5,257
  • 4
  • 40
  • 56