Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# AWS SES
In order to use `component-aws-ses` you first need to have a `.env` file containing AWS data in the root folder of the starting point of your application.
The `.env` file contain the following data:
```bash
AWS_SES_SECRET_KEY = <secretKey>
AWS_SES_ACCESS_KEY = <accessKey>
EMAIL_SENDER = verified_ses_sender@domain.com
AWS_SES_REGION = region-name
```
Then, as soon as possible in your app you should add the `dotenv` package:
```js
require('dotenv').config()
```
# `component-aws-ses` API
A list of endpoints that help you upload, download and delete S3 files.
## Send an email [POST]
#### Request
`POST /api/email`
#### Request body
All parameters are `required`
```json
{
"email": "to_email@domain.com",
"subject": "Example subject",
"textBody": "this is an email",
"htmlBody": "<p><b>This</b> is an <i>email</i>"
}
```
#### Response
```json
HTTP/1.1 204
```