Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

skojin/send-gmail-lambda

Open more actions menu

Repository files navigation

send-gmail-lambda

Small simple AWS lambda REST microservice that send email via Gmail

Setup

git clone https://github.com/skojin/send-gmail-lambda.git
cd send-gmail-lambda
npm install
bundle install
cp config.rb.example config.rb

Get gmail oauth credential using this guide, and save them to config.rb

Deploy to AWS lambda with Serverless Framework

serverless deploy

Remember endpoint URL from deploy command output

Invoke

  # ruby
  Net::HTTP.post_form(
    URI("https://XXX.execute-api.us-east-1.amazonaws.com/dev/send/some-random-secure-key"),
    {to: "email@example.com", subject: 'SUBJECT' body: 'TEXT BODY'})
curl -X POST "https://XXX.execute-api.us-east-1.amazonaws.com/dev/send/some-random-secure-key" -d "subject=SUBJECT&body=BODY&to=email@example.com"

About

AWS lambda send Gmail email microservice

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.