Git Product home page Git Product logo

serverless-ses-forwarder's Introduction

Serverless SES Forwarder

Serverless SemVer License

This is a simple, serverless email forwarder that uses Amazon Simple Email Service (Amazon SES). It was built using the Serverless framework, which is used to create an Amazon CloudFormation stack that includes most of the necessary assets.

Installation

Please review the Limitations of this project.

Amazon AWS

  1. In Amazon SES, verify the domains that you want to use to receive and forward emails.
  2. If you have a sandbox SES account, you must also verify the addresses to which you want to forward emails if those addresses are not included in verified domains.
  3. If you have not yet configured inbound email handling, you must create a new Rule Set. Otherwise, you can use an existing one.

SES Email Forwarder

  1. Rename config.example to config.js, and adjust the configuration.
  2. Rename env.example to env.yaml, and add the name of the Amazon SES Rule Set.
  3. Run sls deploy --stage prod.

Configuration

env.yaml

Rename env.example to env.yaml.

The env.yaml file provides the Amazon SES Rule Set Name that will be used by the Serverless Framework to create the Receipt Rule that will forward the email.

# Prod Stage
prod:
  ses:
    ruleSetName: live-rule-set

# If a stage is not specified, the default value is used.
default:
  ses:
    ruleSetName: default-rule-set

It is possible to specify different Rule Set Names for different stages, but only one Rule Set can be active at a time. It is usually easier to use the same Rule Set for every stage.

config.js

Rename config.example to config.js.

The config.js file specifies how emails should be forwarded.

module.exports = {
  default: {
    fromEmail: '[email protected]',
    forwardMapping: {
      '@sentto.example': [
        '[email protected]',
      ],
    },
  },
};

It is possible to specify different configurations for different stages.

About

Limitations

SES Only Sends Emails from Verified Addresses and Domains

This script was designed to forward emails from any sender. In order to accomplish this, the From and Reply-To headers of the original message are modified to allow SES to send the email, but also to reflect the original sender.

So for a message sent from Some Guy <[email protected]> to [email protected], the From and Reply-To headers will be set to:

From: Some Guy <[email protected]>
Reply-To: [email protected]

SES Only Receives Emails for Verified Addresses and Domains

Domains and addresses must first be verified before they can be used with this forwarder.

See Verifying Domains in Amazon SES.

SES Emails are Limited to 10 MB

This includes attachments after encoding.

See Limits in Amazon SES.

New SES Users Start in a Sandbox

Initially, all SES users start in a sandbox environment that has a number of limitations. Users must submit a support request to have their accounts removed from the sandbox.

See Limits in Amazon SES.

License

This project is licensed under the terms of the MIT license.

Credits

Shout outs to these talented developers:

serverless-ses-forwarder's People

Contributors

ejsexton82 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

serverless-ses-forwarder's Issues

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.