aws-ses-rails31 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/CHANGELOG ADDED
@@ -0,0 +1,37 @@
1
+ 0.4.2:
2
+ * Added support for ReplyToAddresses, Destinations, and Source (pzb)
3
+ * Added custom User-Agent header (pzb)
4
+ * Widespread doc updates
5
+
6
+ 0.4.1:
7
+ * Removed many unneeded monkeypatch extensions
8
+ * Tests ( and gem ) run in 1.9.2
9
+
10
+ 0.4.0:
11
+ * This version may have some small incompatibilities due to adding support for MessageId. Check that the result still matches what you previously expected.
12
+ * Added MessageId support in responses
13
+ * Improved resulting data from many responses
14
+ * Added tests and documentation for quota and statistics
15
+ * Added Rails 2.3.x support ( I HOPE!!! )
16
+
17
+ 0.3.2:
18
+ * Removed unused extensions that were conflicting with S3
19
+
20
+ 0.3.1:
21
+ * Downgraded mail gem version required to enhance Rails 3.0.0 compatibility
22
+
23
+ 0.3.0:
24
+ * Added send_raw_email support
25
+ * Added support for Rails3
26
+ * Vastly improved error handling and got rid of a bunch of stuff that wasn't used
27
+
28
+ 0.2.0:
29
+ * Added info support
30
+ * Added send_email
31
+
32
+ 0.1.0:
33
+ - Initial creation that supports:
34
+
35
+ * addresses.list
36
+ * addresses.verify(email)
37
+ * addresses.delete(email)
data/Gemfile ADDED
@@ -0,0 +1,19 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ # Add dependencies to develop your gem here.
7
+ # Include everything needed to run rake, tests, features, etc.
8
+ group :development do
9
+ gem "shoulda-context", ">= 0"
10
+ gem "bundler", "~> 1.0.0"
11
+ gem "jeweler", "~> 1.5.2"
12
+ gem "rcov", ">= 0"
13
+ gem 'flexmock', '~> 0.8.11'
14
+ end
15
+
16
+ gem 'xml-simple'
17
+ gem 'builder'
18
+ gem 'mime-types'
19
+ gem 'mail', '>= 2.2.5'
data/Gemfile.lock ADDED
@@ -0,0 +1,39 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ activesupport (3.0.3)
5
+ builder (3.0.0)
6
+ flexmock (0.8.11)
7
+ git (1.2.5)
8
+ i18n (0.5.0)
9
+ jeweler (1.5.2)
10
+ bundler (~> 1.0.0)
11
+ git (>= 1.2.5)
12
+ rake
13
+ mail (2.2.15)
14
+ activesupport (>= 2.3.6)
15
+ i18n (>= 0.4.0)
16
+ mime-types (~> 1.16)
17
+ treetop (~> 1.4.8)
18
+ mime-types (1.16)
19
+ polyglot (0.3.1)
20
+ rake (0.8.7)
21
+ rcov (0.9.9)
22
+ shoulda-context (1.0.0.beta1)
23
+ treetop (1.4.9)
24
+ polyglot (>= 0.3.1)
25
+ xml-simple (1.0.13)
26
+
27
+ PLATFORMS
28
+ ruby
29
+
30
+ DEPENDENCIES
31
+ builder
32
+ bundler (~> 1.0.0)
33
+ flexmock (~> 0.8.11)
34
+ jeweler (~> 1.5.2)
35
+ mail (>= 2.2.5)
36
+ mime-types
37
+ rcov
38
+ shoulda-context
39
+ xml-simple
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+
2
+ Copyright (c) 2011 Drew V. Blas <drew.blas@gmail.com>
3
+ Copyright (c) 2006-2009 Marcel Molina Jr. <marcel@vernix.org>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in the
7
+ Software without restriction, including without limitation the rights to use,
8
+ copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
9
+ Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19
+ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.erb ADDED
@@ -0,0 +1,92 @@
1
+ = AWS::SES
2
+
3
+ <%= docs_for['AWS::SES'] %>
4
+
5
+ == Send E-mail
6
+
7
+ <%= docs_for ['AWS::SES::SendEmail'] %>
8
+
9
+ == Addresses
10
+
11
+ <%= docs_for['AWS::SES::Addresses'] %>
12
+
13
+ == Info
14
+
15
+ <%= docs_for['AWS::SES::Info'] %>
16
+
17
+ == Rails
18
+
19
+ This gem is compatible with Rails >= 3.0.0 and Rails 2.3.x
20
+
21
+ To use, first add the gem to your Gemfile:
22
+
23
+ gem "aws-ses", "~> 0.4.1", :require => 'aws/ses'
24
+
25
+ == For Rails 3.x
26
+
27
+ Then, add your Amazon credentials and extend ActionMailer in `config/initializers/amazon_ses.rb`:
28
+
29
+ ActionMailer::Base.add_delivery_method :ses, AWS::SES::Base,
30
+ :access_key_id => 'abc',
31
+ :secret_access_key => '123'
32
+
33
+ Then set the delivery method in `config/environments/*rb` as appropriate:
34
+
35
+ config.action_mailer.delivery_method = :ses
36
+
37
+ == For Rails 2.3.x
38
+
39
+ Then set the delivery method in `config/environments/*rb` as appropriate:
40
+
41
+ config.after_initialize do
42
+ ActionMailer::Base.delivery_method = :amazon_ses
43
+ ActionMailer::Base.custom_amazon_ses_mailer = AWS::SES::Base.new(:secret_access_key => 'abc', :access_key_id => '123')
44
+ end
45
+
46
+ == Issues
47
+
48
+ === HTTP Segmentation fault
49
+
50
+ If you get this error:
51
+ net/http.rb:677: [BUG] Segmentation fault
52
+
53
+ It means that you are not running with SSL enabled in ruby. Re-compile ruby with ssl support or add this option to your environment:
54
+ RUBYOPT="-r openssl"
55
+
56
+ === Rejected sending
57
+
58
+ If you are receiving this message and you HAVE verified the [source] please <b>check to be sure you are not in sandbox mode!</b>
59
+ "Email address is not verified.MessageRejected (AWS::Error)"
60
+ If you have not been granted production access, you will have to <b>verify all recipients</b> as well.
61
+
62
+ http://docs.amazonwebservices.com/ses/2010-12-01/DeveloperGuide/index.html?InitialSetup.Customer.html
63
+
64
+ == Source
65
+
66
+ Available at: https://github.com/drewblas/aws-ses
67
+
68
+ == Contributing to aws-ses
69
+
70
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
71
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
72
+ * Fork the project
73
+ * Start a feature/bugfix branch
74
+ * Commit and push until you are happy with your contribution
75
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
76
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
77
+
78
+ == Copyright
79
+
80
+ Copyright (c) 2011 Drew Blas. See LICENSE for further details.
81
+
82
+ == Thanks
83
+
84
+ Special thanks to Marcel Molina Jr. for his creation of AWS::S3 which I used portions of to get things working.
85
+
86
+ === Other Contributors:
87
+
88
+ * croaky
89
+ * nathanbertram
90
+ * sshaw
91
+ * teeparham (documentation)
92
+ * pzb
data/README.rdoc ADDED
@@ -0,0 +1,196 @@
1
+ = AWS::SES
2
+
3
+ AWS::SES is a Ruby library for Amazon's Simple Email Service's REST API (http://aws.amazon.com/ses).
4
+
5
+ == Getting started
6
+
7
+ To get started you need to require 'aws/ses':
8
+
9
+ % irb -rubygems
10
+ irb(main):001:0> require 'aws/ses'
11
+ # => true
12
+
13
+ Before you can do anything, you must establish a connection using Base.new. A basic connection would look something like this:
14
+
15
+ ses = AWS::SES::Base.new(
16
+ :access_key_id => 'abc',
17
+ :secret_access_key => '123'
18
+ )
19
+
20
+ The minimum connection options that you must specify are your access key id and your secret access key.
21
+
22
+
23
+ == Send E-mail
24
+
25
+ Adds functionality for send_email and send_raw_email
26
+ Use the following to send an e-mail:
27
+
28
+ ses = AWS::SES::Base.new( ... connection info ... )
29
+ ses.send_email :to => ['jon@example.com', 'dave@example.com'],
30
+ :source => '"Steve Smith" <steve@example.com>',
31
+ :subject => 'Subject Line'
32
+ :text_body => 'Internal text body'
33
+
34
+ By default, the email "from" display address is whatever is before the @.
35
+ To change the display from, use the format:
36
+
37
+ "Steve Smith" <steve@example.com>
38
+
39
+ You can also send Mail objects using send_raw_email:
40
+
41
+ m = Mail.new( :to => ..., :from => ... )
42
+ ses.send_raw_email(m)
43
+
44
+ send_raw_email will also take a hash and pass it through Mail.new automatically as well.
45
+
46
+
47
+
48
+ == Addresses
49
+
50
+ AWS::SES::Addresses provides for:
51
+ * Listing verified e-mail addresses
52
+ * Adding new e-mail addresses to verify
53
+ * Deleting verified e-mail addresses
54
+
55
+ You can access these methods as follows:
56
+
57
+ ses = AWS::SES::Base.new( ... connection info ... )
58
+
59
+ # Get a list of verified addresses
60
+ ses.addresses.list.result
61
+
62
+ # Add a new e-mail address to verify
63
+ ses.addresses.verify('jon@example.com')
64
+
65
+ # Delete an e-mail address
66
+ ses.addresses.delete('jon@example.com')
67
+
68
+
69
+ == Info
70
+
71
+ Adds functionality for the statistics and info send quota data that Amazon SES makes available
72
+
73
+ You can access these methods as follows:
74
+
75
+ ses = AWS::SES::Base.new( ... connection info ... )
76
+
77
+ == Get the quota information
78
+ response = ses.quota
79
+ # How many e-mails you've sent in the last 24 hours
80
+ response.sent_last_24_hours
81
+ # How many e-mails you're allowed to send in 24 hours
82
+ response.max_24_hour_send
83
+ # How many e-mails you can send per second
84
+ response.max_send_rate
85
+
86
+ == Get detailed send statistics
87
+ The result is a list of data points, representing the last two weeks of sending activity.
88
+ Each data point in the list contains statistics for a 15-minute interval.
89
+ GetSendStatisticsResponse#data_points is an array where each element is a hash with give string keys:
90
+
91
+ * +Bounces+
92
+ * +DeliveryAttempts+
93
+ * +Rejects+
94
+ * +Complaints+
95
+ * +Timestamp+
96
+
97
+ response = ses.statistics
98
+ response.data_points # =>
99
+ [{"Bounces"=>"0",
100
+ "Timestamp"=>"2011-01-26T16:30:00Z",
101
+ "DeliveryAttempts"=>"1",
102
+ "Rejects"=>"0",
103
+ "Complaints"=>"0"},
104
+ {"Bounces"=>"0",
105
+ "Timestamp"=>"2011-02-09T14:45:00Z",
106
+ "DeliveryAttempts"=>"3",
107
+ "Rejects"=>"0",
108
+ "Complaints"=>"0"},
109
+ {"Bounces"=>"0",
110
+ "Timestamp"=>"2011-01-31T15:30:00Z",
111
+ "DeliveryAttempts"=>"3",
112
+ "Rejects"=>"0",
113
+ "Complaints"=>"0"},
114
+ {"Bounces"=>"0",
115
+ "Timestamp"=>"2011-01-31T16:00:00Z",
116
+ "DeliveryAttempts"=>"3",
117
+ "Rejects"=>"0",
118
+ "Complaints"=>"0"}]
119
+
120
+
121
+ == Rails
122
+
123
+ This gem is compatible with Rails >= 3.0.0 and Rails 2.3.x
124
+
125
+ To use, first add the gem to your Gemfile:
126
+
127
+ gem "aws-ses", "~> 0.4.1", :require => 'aws/ses'
128
+
129
+ == For Rails 3.x
130
+
131
+ Then, add your Amazon credentials and extend ActionMailer in `config/initializers/amazon_ses.rb`:
132
+
133
+ ActionMailer::Base.add_delivery_method :ses, AWS::SES::Base,
134
+ :access_key_id => 'abc',
135
+ :secret_access_key => '123'
136
+
137
+ Then set the delivery method in `config/environments/*rb` as appropriate:
138
+
139
+ config.action_mailer.delivery_method = :ses
140
+
141
+ == For Rails 2.3.x
142
+
143
+ Then set the delivery method in `config/environments/*rb` as appropriate:
144
+
145
+ config.after_initialize do
146
+ ActionMailer::Base.delivery_method = :amazon_ses
147
+ ActionMailer::Base.custom_amazon_ses_mailer = AWS::SES::Base.new(:secret_access_key => 'abc', :access_key_id => '123')
148
+ end
149
+
150
+ == Issues
151
+
152
+ === HTTP Segmentation fault
153
+
154
+ If you get this error:
155
+ net/http.rb:677: [BUG] Segmentation fault
156
+
157
+ It means that you are not running with SSL enabled in ruby. Re-compile ruby with ssl support or add this option to your environment:
158
+ RUBYOPT="-r openssl"
159
+
160
+ === Rejected sending
161
+
162
+ If you are receiving this message and you HAVE verified the [source] please <b>check to be sure you are not in sandbox mode!</b>
163
+ "Email address is not verified.MessageRejected (AWS::Error)"
164
+ If you have not been granted production access, you will have to <b>verify all recipients</b> as well.
165
+
166
+ http://docs.amazonwebservices.com/ses/2010-12-01/DeveloperGuide/index.html?InitialSetup.Customer.html
167
+
168
+ == Source
169
+
170
+ Available at: https://github.com/drewblas/aws-ses
171
+
172
+ == Contributing to aws-ses
173
+
174
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
175
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
176
+ * Fork the project
177
+ * Start a feature/bugfix branch
178
+ * Commit and push until you are happy with your contribution
179
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
180
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
181
+
182
+ == Copyright
183
+
184
+ Copyright (c) 2011 Drew Blas. See LICENSE for further details.
185
+
186
+ == Thanks
187
+
188
+ Special thanks to Marcel Molina Jr. for his creation of AWS::S3 which I used portions of to get things working.
189
+
190
+ === Other Contributors:
191
+
192
+ * croaky
193
+ * nathanbertram
194
+ * sshaw
195
+ * teeparham (documentation)
196
+ * pzb
data/Rakefile ADDED
@@ -0,0 +1,88 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'rake'
11
+
12
+ require 'erb'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "aws-ses-rails31"
18
+ gem.homepage = "http://github.com/drewblas/aws-ses"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{Client library for Amazon's Simple Email Service's REST API}
21
+ gem.description = gem.summary
22
+ gem.email = "drew.blas@gmail.com"
23
+ gem.authors = ["Drew Blas", 'Marcel Molina Jr.']
24
+ # Include your dependencies below. Runtime dependencies are required when using your gem,
25
+ # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
26
+ # gem.add_runtime_dependency 'jabber4r', '> 0.1'
27
+ # gem.add_development_dependency 'rspec', '> 1.2.3'
28
+ gem.add_dependency 'xml-simple'
29
+ gem.add_dependency 'builder'
30
+ gem.add_dependency 'mime-types'
31
+ end
32
+ Jeweler::RubygemsDotOrgTasks.new
33
+
34
+ require 'rake/testtask'
35
+ Rake::TestTask.new(:test) do |test|
36
+ test.libs << 'lib' << 'test'
37
+ test.pattern = 'test/**/*_test.rb'
38
+ test.verbose = true
39
+ end
40
+
41
+ require 'rcov/rcovtask'
42
+ Rcov::RcovTask.new do |test|
43
+ test.libs << 'test'
44
+ test.pattern = 'test/**/*_test.rb'
45
+ test.verbose = true
46
+ end
47
+
48
+ task :default => :test
49
+
50
+ require 'rake/rdoctask'
51
+ require File.dirname(__FILE__) + '/lib/aws/ses'
52
+
53
+ namespace :doc do
54
+ Rake::RDocTask.new do |rdoc|
55
+ rdoc.rdoc_dir = 'doc'
56
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
57
+ rdoc.title = "AWS::SES -- Support for Amazon SES's REST api #{version}"
58
+ rdoc.options << '--line-numbers' << '--inline-source'
59
+ rdoc.rdoc_files.include('README.rdoc')
60
+ rdoc.rdoc_files.include('LICENSE')
61
+ rdoc.rdoc_files.include('CHANGELOG')
62
+ rdoc.rdoc_files.include('TODO')
63
+ rdoc.rdoc_files.include('VERSION')
64
+ rdoc.rdoc_files.include('lib/**/*.rb')
65
+ end
66
+
67
+ task :rdoc => 'doc:readme'
68
+
69
+ task :refresh => :rerdoc do
70
+ system 'open doc/index.html'
71
+ end
72
+
73
+ task :readme do
74
+ require 'support/rdoc/code_info'
75
+ RDoc::CodeInfo.parse('lib/**/*.rb')
76
+
77
+ strip_comments = lambda {|comment| comment.gsub(/^# ?/, '')}
78
+ docs_for = lambda do |location|
79
+ info = RDoc::CodeInfo.for(location)
80
+ raise RuntimeError, "Couldn't find documentation for `#{location}'" unless info
81
+ strip_comments[info.comment]
82
+ end
83
+
84
+ open('README.rdoc', 'w') do |file|
85
+ file.write ERB.new(IO.read('README.erb')).result(binding)
86
+ end
87
+ end
88
+ end
data/TODO ADDED
@@ -0,0 +1,3 @@
1
+ * Use a better XML parser (and be consistent)
2
+ * Rename Base to something else (probably Mailer): Nothing else actually inherits from Base, so that is a very poor naming convention. I intend to change it in the future
3
+ * Integer responses should probably be cast to ints instead of left as strings
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.4.3
@@ -0,0 +1,114 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{aws-ses-rails31}
8
+ s.version = "0.4.3"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Drew Blas", "Marcel Molina Jr."]
12
+ s.date = %q{2011-06-21}
13
+ s.description = %q{Client library for Amazon's Simple Email Service's REST API}
14
+ s.email = %q{drew.blas@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.erb",
18
+ "README.rdoc",
19
+ "TODO"
20
+ ]
21
+ s.files = [
22
+ ".document",
23
+ "CHANGELOG",
24
+ "Gemfile",
25
+ "Gemfile.lock",
26
+ "LICENSE",
27
+ "README.erb",
28
+ "README.rdoc",
29
+ "Rakefile",
30
+ "TODO",
31
+ "VERSION",
32
+ "aws-ses-rails31.gemspec",
33
+ "lib/aws/actionmailer/ses_extension.rb",
34
+ "lib/aws/ses.rb",
35
+ "lib/aws/ses/addresses.rb",
36
+ "lib/aws/ses/base.rb",
37
+ "lib/aws/ses/extensions.rb",
38
+ "lib/aws/ses/info.rb",
39
+ "lib/aws/ses/response.rb",
40
+ "lib/aws/ses/send_email.rb",
41
+ "lib/aws/ses/version.rb",
42
+ "test/address_test.rb",
43
+ "test/base_test.rb",
44
+ "test/extensions_test.rb",
45
+ "test/fixtures.rb",
46
+ "test/helper.rb",
47
+ "test/info_test.rb",
48
+ "test/mocks/fake_response.rb",
49
+ "test/response_test.rb",
50
+ "test/send_email_test.rb"
51
+ ]
52
+ s.homepage = %q{http://github.com/drewblas/aws-ses}
53
+ s.licenses = ["MIT"]
54
+ s.require_paths = ["lib"]
55
+ s.rubygems_version = %q{1.6.2}
56
+ s.summary = %q{Client library for Amazon's Simple Email Service's REST API}
57
+ s.test_files = [
58
+ "test/address_test.rb",
59
+ "test/base_test.rb",
60
+ "test/extensions_test.rb",
61
+ "test/fixtures.rb",
62
+ "test/helper.rb",
63
+ "test/info_test.rb",
64
+ "test/mocks/fake_response.rb",
65
+ "test/response_test.rb",
66
+ "test/send_email_test.rb"
67
+ ]
68
+
69
+ if s.respond_to? :specification_version then
70
+ s.specification_version = 3
71
+
72
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
73
+ s.add_runtime_dependency(%q<xml-simple>, [">= 0"])
74
+ s.add_runtime_dependency(%q<builder>, [">= 0"])
75
+ s.add_runtime_dependency(%q<mime-types>, [">= 0"])
76
+ s.add_runtime_dependency(%q<mail>, [">= 2.2.5"])
77
+ s.add_development_dependency(%q<shoulda-context>, [">= 0"])
78
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
79
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
80
+ s.add_development_dependency(%q<rcov>, [">= 0"])
81
+ s.add_development_dependency(%q<flexmock>, ["~> 0.8.11"])
82
+ s.add_runtime_dependency(%q<xml-simple>, [">= 0"])
83
+ s.add_runtime_dependency(%q<builder>, [">= 0"])
84
+ s.add_runtime_dependency(%q<mime-types>, [">= 0"])
85
+ else
86
+ s.add_dependency(%q<xml-simple>, [">= 0"])
87
+ s.add_dependency(%q<builder>, [">= 0"])
88
+ s.add_dependency(%q<mime-types>, [">= 0"])
89
+ s.add_dependency(%q<mail>, [">= 2.2.5"])
90
+ s.add_dependency(%q<shoulda-context>, [">= 0"])
91
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
92
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
93
+ s.add_dependency(%q<rcov>, [">= 0"])
94
+ s.add_dependency(%q<flexmock>, ["~> 0.8.11"])
95
+ s.add_dependency(%q<xml-simple>, [">= 0"])
96
+ s.add_dependency(%q<builder>, [">= 0"])
97
+ s.add_dependency(%q<mime-types>, [">= 0"])
98
+ end
99
+ else
100
+ s.add_dependency(%q<xml-simple>, [">= 0"])
101
+ s.add_dependency(%q<builder>, [">= 0"])
102
+ s.add_dependency(%q<mime-types>, [">= 0"])
103
+ s.add_dependency(%q<mail>, [">= 2.2.5"])
104
+ s.add_dependency(%q<shoulda-context>, [">= 0"])
105
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
106
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
107
+ s.add_dependency(%q<rcov>, [">= 0"])
108
+ s.add_dependency(%q<flexmock>, ["~> 0.8.11"])
109
+ s.add_dependency(%q<xml-simple>, [">= 0"])
110
+ s.add_dependency(%q<builder>, [">= 0"])
111
+ s.add_dependency(%q<mime-types>, [">= 0"])
112
+ end
113
+ end
114
+
@@ -0,0 +1,19 @@
1
+ # A quick little extension to use this lib with with rails 2.3.X
2
+ # To use it, in your environment.rb or some_environment.rb you simply set
3
+ #
4
+ # config.after_initialize do
5
+ # ActionMailer::Base.delivery_method = :amazon_ses
6
+ # ActionMailer::Base.custom_amazon_ses_mailer = AWS::SES::Base.new(:secret_access_key => S3_CONFIG[:secret_access_key], :access_key_id => S3_CONFIG[:access_key_id])
7
+ # end
8
+
9
+ module ActionMailer
10
+ class Base
11
+ cattr_accessor :custom_amazon_ses_mailer
12
+
13
+ def perform_delivery_amazon_ses(mail)
14
+ raise 'AWS::SES::Base has not been intitialized.' unless @@custom_amazon_ses_mailer
15
+ @@custom_amazon_ses_mailer.deliver!(mail)
16
+ end
17
+
18
+ end
19
+ end