Skip to content
This repository has been archived by the owner on May 10, 2020. It is now read-only.

Lambda function to send form emails using NOW & MAILGUN

Notifications You must be signed in to change notification settings

skydiver/now-mailgun-sender

Repository files navigation

now-mailgun-sender

Lambda function to send form emails using NOW & MAILGUN

Setup

  1. copy now.json.example as now.json then replace with your settings.

  2. set now.sh secrets:

now secrets add mailgun_api_key "YOU_MAILGUN_API_KEY"
now secrets add mailgun_domain "YOUR_MAILGUN_DOMAIN"
now secrets add mailgun_recipient "YOUR_EMAIL_ADDRESS"
now secrets add mailgun_sender "NOREPLY_ADDRESS"
  1. deploy to now with npm run now-deploy

Usage

URL: /

Method: POST

Auth required: NO

Permissions required: None

Data example (all fields must be sent):

{
  "name": "John Doe",
  "email": "[email protected]",
  "message": "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
}

Releases

No releases published

Packages

No packages published