amazon_ses 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.rdoc +47 -1
  2. data/VERSION +1 -1
  3. data/amazon_ses.gemspec +1 -2
  4. metadata +2 -3
  5. data/rails/init.rb +0 -22
@@ -1,7 +1,53 @@
1
1
  = amazon_ses
2
2
 
3
3
  Really simple gem that allows you to send email through amazon simple email
4
- service via the standard rails mailer.
4
+ service.
5
+
6
+ <b>Installation</b>
7
+
8
+ gem install amazon_ses
9
+
10
+ <b>Usage:</b>
11
+
12
+ require 'rubygems'
13
+ require 'amazon_ses'
14
+
15
+ # all methods return a raw http response object
16
+ # to get the xml just call body on the return object from any of
17
+ # the following methods.
18
+ # Exceptions will be throw on any api call that doesn't result in
19
+ # a 200 OK response from amazon.
20
+
21
+
22
+ # you must have a verified address with amazon to send mail
23
+ AmazonSES::Verify.address("youremail@gmail.com",amazon_secret,amazon_key)
24
+
25
+ # after verifying the address you can send mail
26
+
27
+ # simple send mail text only
28
+ AmazonSES::AmzMail.send(from,to,subject,body,secret,key)
29
+ # send html email
30
+ AmazonSES::AmzMail.send_html(from,to,subject,body,secret,key)
31
+ # if you produce your own email via the mail gem you can pass the result of calling to_s on the mail object
32
+ # to the following method
33
+ AmazonSES::AmzMail.send_raw(mail_string,amazon_secret,amazon_key)
34
+
35
+ # the following are two methods for getting stats
36
+
37
+ puts AmazonSES::Stats.send_quota(amazon_secret,amazon_key).body
38
+ puts AmazonSES::Stats.send_stats(amazon_secret,amazon_key).body
39
+
40
+ # the following is a helper object for looking at your stats
41
+
42
+ stobj = StatObject.new(amazon_secret,amazon_key)
43
+ puts stobj.sent_last_24_hours
44
+ puts stobj.reached_quota?
45
+
46
+
47
+ Hope you enjoy the Gem. If anyone wants to write a plugin for rails I would link definately link to it and find it useful.
48
+
49
+
50
+
5
51
 
6
52
  == Note on Patches/Pull Requests
7
53
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{amazon_ses}
8
- s.version = "1.0.0"
8
+ s.version = "1.0.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["jeff durand"]
@@ -29,7 +29,6 @@ Gem::Specification.new do |s|
29
29
  "lib/amazon_ses/base.rb",
30
30
  "lib/amazon_ses/stats.rb",
31
31
  "lib/amazon_ses/verify.rb",
32
- "rails/init.rb",
33
32
  "test/helper.rb",
34
33
  "test/test_amazon_ses.rb"
35
34
  ]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 0
9
- version: 1.0.0
8
+ - 1
9
+ version: 1.0.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - jeff durand
@@ -63,7 +63,6 @@ files:
63
63
  - lib/amazon_ses/base.rb
64
64
  - lib/amazon_ses/stats.rb
65
65
  - lib/amazon_ses/verify.rb
66
- - rails/init.rb
67
66
  - test/helper.rb
68
67
  - test/test_amazon_ses.rb
69
68
  has_rdoc: true
@@ -1,22 +0,0 @@
1
- require File.join(File.dirname(__FILE__), *%w[.. lib amazon_ses])
2
- module ActionMailer
3
- class Base
4
- def self.method_missing(method_symbol, *parameters) #:nodoc:
5
-
6
- if match = matches_dynamic_method?(method_symbol)
7
- if match[1]=='create'
8
- new(match[2], *parameters).mail
9
- elsif match[1]=='deliver'
10
- @mymsg = new(match[2], *parameters).mail
11
- AmazonSES::AmzMail.send_html(@mymsg.from,@mymsg.to.first,@mymsg.subject,@mymsg.body,AppConfig.ses_amz_secret,AppConfig.ses_amz_key)
12
- elsif match[1]=='new'
13
- nil
14
- else
15
- super
16
- end
17
- else
18
- super
19
- end
20
- end
21
- end
22
- end