Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Library for interacting with amazon simple email service

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .DS_Store
Octocat-spinner-32 README
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 amazon-ses-0.0.4.gem
Octocat-spinner-32 amazon-ses-0.0.5.gem
Octocat-spinner-32 amazon-ses.gemspec
README.rdoc

amazon-ses

A gem for interfacing with Amazon's Simple Email Service

Features:

Currently you can:

  • Send a basic raw text email.

  • Send email with a .erb template

Prerequisite

  1. First, make sure you validate the email that you are going to use in the “from” section of the email.

http://docs.amazonwebservices.com/ses/latest/DeveloperGuide/

How does it work:

  1. Build email:

* Raw email without a .erb template:
  You can achieve this by NOT specifying a :template in your options:

  options = {
    :from => 'email@gmail.com', 
    :to => 'email@gmail.com', 
    :subject => 'Testing', 
    :body => 'THis is a test', 
    :aws_access_key => 'your acess key', 
    :aws_secret_key => 'your secret key'
  }

  e = AmazonEmail.new(options) 

* Email that will use a .erb template:
  You can achieve this by specifying the location of you .erb file in the :template option:

  options_2 = {  
    :from => 'from@email.com', 
    :to => 'to@email.com', 
    :subject => 'This is the subject of the email',  
    :aws_access_key => "access_key_id",
    :aws_secret_key => "secret_access_key",
    :template => File.new("sample_email.erb").read
  }

  e = AmazonEmail.new(options_2) 

* Email multiple people
  You can achieve this by sending a Array in the :to field of the options

  options_3 = {
    :from => 'from@email.com', 
    :to => ['to@email.com', 'to_2@email.com', 'to_3@email.com'],
    :subject => 'This is the subject of the email',  
    :aws_access_key => "access_key_id",
    :aws_secret_key => "secret_access_key",
    :template => File.new("sample_email.erb").read
  }
  e = AmazinEmail.new(options_3)
  1. Send it

e.send

Install:

* sudo gem install amazon-ses
Something went wrong with that request. Please try again.