Socket
Book a DemoInstallSign in
Socket

@pubsweet/component-aws-ses

Package Overview
Dependencies
Maintainers
5
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pubsweet/component-aws-ses

aws ses configured for pubsweet

0.1.0
latest
npmnpm
Version published
Weekly downloads
1
Maintainers
5
Weekly downloads
 
Created
Source

AWS SES Configuration

In order to use this component, the following configuration needs to be added to a PubSweet application inside a section named pubsweet-component-aws-ses:

  • secretAccessKey: the AWS_SES_SECRET_KEY value from the app's .env file
  • accessKeyId: the AWS_SES_ACCESS_KEY value from the app's .env file
  • region: the AWS_SES_REGION value from the app's .env file
  • sender: the EMAIL_SENDER value from the app's .env file

For example:

"pubsweet-component-aws-ses": {
    "secretAccessKey": "process.env.AWS_SES_SECRET_KEY",
    "accessKeyId": "process.env.AWS_SES_ACCESS_KEY",
    "region": "process.env.AWS_SES_REGION",
    "sender": "process.env.EMAIL_SENDER",
  },

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:

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:

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

{
  "email": "to_email@domain.com",
  "subject": "Example subject",
  "textBody": "this is an email",
  "htmlBody": "<p><b>This</b> is an <i>email</i>"
}

Response

HTTP/1.1 204

FAQs

Package last updated on 16 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.