npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-ses-helper

v1.0.8

Published

A helper library for the Simple Email Service, integrates with AWS SDK

Downloads

9

Readme

react-ses-helper

A helper library for the Simple Email Service, integrates with AWS SDK

NPM JavaScript Style Guide

Install

npm install --save react-ses-helper

Then install the dependencies.

Dependencies

npm install --save aws-sdk

Then review the AWS configuration

Configuration

AWS SES Sender Receiver

The sender (source) email address should be configured and verified. If SES is in sandbox mode, the receiver email address(es) should also be configured and verified. A test email should be sent from the SES console and ensured that the intended receiver receives it.

AWS SES Template

This is required if you are planning to send templated emails. An html template should be created. As of July 22, SES console does not support adding email templates. They can only be done through the apis. Best way is to do it via aws command line interface.

AWS Credentials

AWS region, secret and access key form the credentials. These are required to use this package. It is crucial that these credentials are given the SES email sending permissions, otherwise the emails will not be sent.

You can now review the functionality below.

Functionality


/*

region: aws region
secret: aws secret
key: aws access key
subject: subject of email
source: source email (needs to be configured in aws ses)
destinationToArr: array of destination emails
destinationCCArr: array of emails to be cced
htmlBody: html body
textBody: text body
replyToArr: array to reply to email addresses
template: name of template that is configured in aws ses
templateData: json string representation of key value pairs that are the template data

*/

sendEmail(region, secret, key, subject, source, destinationToArr, destinationCCArr, htmlBody, textBody, replyToArr) {}

sendTemplatedEmail(region, secret, key, source, destinationToArr, destinationCCArr, templateName, templateData, replyToArr) {}

Usage

import React, { useEffect } from 'react'
import * as SesHelper from 'react-ses-helper'

const App = () => {

  useEffect(() => {
    async function sendEmail() {
      
      SesHelper.sendEmail("aws_region", "aws_secret", "aws_key", "Test Subject", "supe*******@**ail.com", ["hrus*******@**ail.com"], [], "HTML Body", "Text Body", [])
  
    }
    sendEmail();
  }, [])

  useEffect(() => {
    async function sendTemplatedEmail() {
      
      SesHelper.sendTemplatedEmail("aws_region", "aws_secret", "aws_key", "su******@***il.com", ["hr*******ndale@**ail.com"], [], "TemplateOtp1", "{\"project\": \"superflows\", \"name\": \"Hrushikesh\", \"otp\": \"1313\"}", [])
  
    }
    sendTemplatedEmail();
  }, [])

  return <div>Hello SES Helper</div>

}

export default App

License

MIT © superflows-dev