Giter Club home page Giter Club logo

carbon_aws_ses_adapter's Introduction

Carbon AWS SES Adapter

Build Status

This is luckyframework/carbon's adapter for AWS SES (Simple Email Service)

https://github.com/luckyframework/carbon

Installation

Add this to your application's shard.yml:

dependencies:
  carbon_aws_ses_adapter:
    github: keizo3/carbon_aws_ses_adapter

Add this to your application's shards.cr:

require "carbon_aws_ses_adapter"

Usage

Configure AWS SES Simple Email Service

  1. Go to the Amazon Web Services developer console.
  2. Ensure that AWS SES is correctly set up according to the documentation.
  3. Create an AWS IAM user who can send emails. The user must have at least the following permissions:
    • ses:SendEmail
    • ses:SendRawEmail
  4. Copy the AWS Access Key and AWS Secret Access key for the IAM user you've created.
  5. Set up the adapter in Lucky via the config/email.cr file.

Configure the mailer class

# config/email.cr

BaseEmail.configure do
  settings.adapter = Carbon::AwsSesAdapter.new(
    key:    ENV["AWS_SES_ACCESS_KEY"],
    secret: ENV["AWS_SES_SECRET_KEY_KEY"],
    region: ENV["AWS_SES_REGION"]
  )
end

Development

  • shards install
  • Make changes
  • crystal spec (will skip sending test emails to AWS SES)
  • crystal spec -D send_real_email (will send real emails, and requires the below .env file content)
# In .env
# If you want to run tests that actually test emails against the AWS SES
AWS_SES_ACCESS_KEY=get_from_aws_ses_key
AWS_SES_SECRET_KEY=get_from_aws_ses_secret
AWS_SES_REGION=get_from_aws_ses_region
AWS_SES_FROM_ADDRESS=verified_address
AWS_SES_TO_ADDRESS=recipient_address

Contributing

  1. Fork it ( https://github.com/keizo3/carbon_aws_ses_adapter )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Make your changes
  4. Run ./bin/test to run the specs, build shards, and check formatting
  5. Commit your changes (git commit -am 'Add some feature')
  6. Push to the branch (git push origin my-new-feature)
  7. Create a new Pull Request

Contributors

  • keizo3 - creator, maintainer

carbon_aws_ses_adapter's People

Contributors

keizo3 avatar stephendolan avatar

Watchers

 avatar  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.