Socket
Book a DemoInstallSign in
Socket

pronto-email-service

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pronto-email-service

For sending emails. Currently supports AWS SES and SendGrid.

0.3.0
latest
Source
npmnpm
Version published
Weekly downloads
6
Maintainers
3
Weekly downloads
 
Created
Source

Pronto Email Service

For sending emails. Currently supports AWS SES and SendGrid.

API

Exposes a single method sendEmail(email, cb).

Email fields are defined in the MailComposer documentation, most importantly you will need to and from addresses, a subject, and a text and/or html body.

email = {
    "to": "Test Jones <test@jones.net>",
    "from": "Example Sender <sender@example.com>",
    "subject": "Hi I am an email",
    "html": "<h1>HELLO</h1><p>Just testing, carry on now.</p>"
}

Setup

Initialize the email service with a config object, declaring and configuring one of the available providers.

ProntoEmailService = require 'pronto-email-service'
{sendEmail} = ProntoEmailService(config)

AWS SES config

Note: Region and access keys may be defined by environment variables (e.g. for a Lambda service).

config = {
    "provider": "ses",
    "region": "us-east-1",
    "accessKeyId": "abc123",
    "secretAccessKey": "def456"
}

SendGrid config

config = {
    "provider": "sendgrid",
    "api_key": "def456"
}

FAQs

Package last updated on 14 Feb 2020

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.