An open API service indexing awesome lists of open source software.

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

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