Skip to content

petergsd/Google-Script-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Google-Script-API

This is one example that use Google Apps Script implemented as executable API to send emails through Gmail API.

Send emails with Google Script API is much easier than a classic method.

####How to: To use it, simply:

  • Create a project on Google Developers Console enabling the Gmail and Google Script Execution API. Then extract the client ID and paste it on:
var CLIENT_ID = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
function myFunction(email, subject, text) {  
    GmailApp.sendEmail(email, subject, text);
    return ['Email sent'];  
}
  • Then, implement it as a executable API, extract the script ID and paste it on:
var scriptId = "XXXXXXXXXXXXXXXXXXXXXXXXXXXX";

####Run To run, use your favorite server or simply type:

python -m SimpleHTTPServer

All rights reserved to Google.

Sorry if my English had mistakes, isn't my first language.

About

Gmail and Google Script API example

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published