GithubHelp home page GithubHelp logo

kfbfarley / aws-ses-sdk-transport Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 19 KB

A full JavaScript Node.js compatible AWS SES Mailer

License: MIT License

HTML 86.59% JavaScript 13.41%
nodemailer nodemailer-transport aws aws-ses mailer javascript nodejs node templates handlebars

aws-ses-sdk-transport's Introduction


A full JavaScript Node.js compatible AWS SES Mailer

A quick and useful JavaScript application to send emails from your Node.js server.

Amazon AWS SES is a cost-effective, flexible, and scalable email service that enables developers to send mail from within any application.

๐Ÿ“‹ Requirements

You may use Windows, macOS, or Linux as your development operating system and the following tools:

Remind: This package was only tested with AWS SES credentials and doesn't support common SMTP connections yet.

๐Ÿš€ Technologies

This project was built using the following technologies:

๐Ÿ Compatibility

This package is compatible with the following templates design:

  • HTML โœ”๏ธ
  • TEXT โœ”๏ธ
  • MJML โ— (working on it)

๐Ÿ”Ž Preview

The following image is an illustration of how the HTML template was handled and compiled with the provided data.

Remind: You can take a look on the templates folder right here.

๐Ÿ’ป Installation

To add this package to your project, simply execute the following command:

Remind: You must be on your project root directory

$ npm install @kfbfarley/[email protected]

After installing the package you have to set your environment variables on your .env file located on your root directory

Note: If you don't know what is a .env file, ckeck this article.

AWS_KEY=
AWS_SECRET=
AWS_SERVER=
AWS_SERVER_PORT=
AWS_EMAIL_FROM=
AWS_EMAIL_CHARSET=
TEMPLATE_DIR=./aws/ses/templates/

๐Ÿ”Ž Usage

$ const ses = require("@kfbfarley/aws-ses-sdk-transport")();

Tip: Place your mouse poiter over the your const variable and you will have access to JSDocs

Methods

  • Send

The method Send(template, receiver) has two parameters, one for template data and another for the receiver data.

๐Ÿ“ Example

If you want to send an email using Amazon Web Service Simple Email Service credentials you should do the following.

Remind: You must have your credentials on your .env file.

const ses = require("@kfbfarley/aws-ses-sdk-transport")();

ses.Send({
    name: "confirm",
    type: "html"
        },{
            email: "[email protected]",
            subject: "Hey, Jonh Doe!",
            priority: true, // remove to set to normal
            first_name: "Jonh",
            url: "https://example.com/enable",
            url_disable: "https://example.com/disable"
        }
);

๐Ÿ’ฌ How to prevent emails going to spam folder?

After the receiver's ISP accpets the email, the ISP decides wheater the email is categorized as span and determines the overall mailbox placement.

There are several factors that can lead to an ISP flagging an email as span, such as:

  • The email content and quality: insecure links, links considered harmful, specific keywords, links to domains that aren't the sending domain

  • DKIM or SPF authentication not provided

  • IP address reputation

  • Multiple emails flagged as spam will put your domain's email into the sandbox

  • High bounce or complaint rates

Setting Up Easy DKIM for a AWS SES domain available here.

๐Ÿ‘ Contributing

Contributions are what make this platform an amazing place to learn, inspire, and create. Please feel free to visit the open issues section to propose or create a related issue.

๐Ÿ“„ Licensing

This repository is MIT licensed, as found in the LICENSE file.

aws-ses-sdk-transport has no documentation, just this repo.

aws-ses-sdk-transport's People

Contributors

kfbfarley avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.