https://github.com/skydiver/now-mailgun-sender
Lambda function to send form emails using NOW & MAILGUN
https://github.com/skydiver/now-mailgun-sender
emailer emails mailgun mailgun-api nodejs now nowsh zeit zeit-now
Last synced: about 1 month ago
JSON representation
Lambda function to send form emails using NOW & MAILGUN
- Host: GitHub
- URL: https://github.com/skydiver/now-mailgun-sender
- Owner: skydiver
- Archived: true
- Created: 2019-02-15T17:34:34.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-17T06:08:58.000Z (about 6 years ago)
- Last Synced: 2025-03-11T08:53:41.344Z (about 2 months ago)
- Topics: emailer, emails, mailgun, mailgun-api, nodejs, now, nowsh, zeit, zeit-now
- Language: JavaScript
- Size: 28.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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"
```3. 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):
```json
{
"name": "John Doe",
"email": "[email protected]",
"message": "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
}
```