amazon-ses-mailer 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +17 -4
- data/amazon-ses-mailer.gemspec +2 -2
- data/lib/amazon-ses-mailer.rb +1 -7
- data/lib/amazon-ses-mailer/version.rb +1 -1
- data/rails/init.rb +1 -0
- metadata +6 -4
data/README.md
CHANGED
@@ -9,14 +9,22 @@ Implements Amazon SES API.
|
|
9
9
|
- `host`: SES endpoint host
|
10
10
|
|
11
11
|
# Limitations
|
12
|
-
Currently it only supports raw message sending.
|
12
|
+
- Currently it only supports raw message sending.
|
13
|
+
- Rails support is not very well tested.
|
14
|
+
|
15
|
+
# Rails Example
|
16
|
+
|
17
|
+
Put in `config/environments/env.rb`:
|
18
|
+
|
19
|
+
mailer = AmazonSes::Mailer.new(secret_key: __, access_key: __)
|
20
|
+
config.action_mailer.deliver_method = mailer
|
13
21
|
|
14
22
|
# Examples
|
15
23
|
|
16
24
|
Create a mailer instance
|
17
25
|
|
18
|
-
mailer =
|
19
|
-
|
26
|
+
mailer = AmazonSes::Mailer.new(secret_key: __, access_key: __)
|
27
|
+
|
20
28
|
Deliver a message
|
21
29
|
|
22
30
|
mailer.deliver to: 'foo@example.com',
|
@@ -31,4 +39,9 @@ Other delivery options
|
|
31
39
|
|
32
40
|
File.open('/path/to/raw/email') do |f|
|
33
41
|
m.deliver(f.read)
|
34
|
-
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# Contributors
|
45
|
+
- Adam Bronte
|
46
|
+
- Eli Fox-Epstein
|
47
|
+
- Hans Hasselberg
|
data/amazon-ses-mailer.gemspec
CHANGED
@@ -6,8 +6,8 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.name = "amazon-ses-mailer"
|
7
7
|
s.version = AmazonSes::VERSION
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
|
-
s.authors = ["Eli Fox-Epstein", '
|
10
|
-
s.email = ["eli@redhyphen.com"]
|
9
|
+
s.authors = ["Eli Fox-Epstein", 'Adam Bronte']
|
10
|
+
s.email = ["eli@redhyphen.com", "adam@brontesaurus.com"]
|
11
11
|
s.homepage = ""
|
12
12
|
s.summary = %q{Amazon SES mailer}
|
13
13
|
s.description = %q{Amazon SES mailer}
|
data/lib/amazon-ses-mailer.rb
CHANGED
@@ -38,17 +38,11 @@ module AmazonSes
|
|
38
38
|
|
39
39
|
http.post("/", data, headers).body
|
40
40
|
end
|
41
|
-
|
42
|
-
def deliver_async(msg)
|
43
|
-
Thread.start do
|
44
|
-
resp = deliver(msg)
|
45
|
-
yield resp if block_given?
|
46
|
-
end
|
47
|
-
end
|
48
41
|
|
49
42
|
private
|
50
43
|
|
51
44
|
def request_data(msg)
|
45
|
+
|
52
46
|
msg_str = if Hash === msg
|
53
47
|
Mail.new(msg).to_s
|
54
48
|
else
|
data/rails/init.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'amazon-ses-mailer'
|
metadata
CHANGED
@@ -5,17 +5,17 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 3
|
9
|
+
version: 0.0.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Eli Fox-Epstein
|
13
|
-
-
|
13
|
+
- Adam Bronte
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-28 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -47,6 +47,7 @@ dependencies:
|
|
47
47
|
description: Amazon SES mailer
|
48
48
|
email:
|
49
49
|
- eli@redhyphen.com
|
50
|
+
- adam@brontesaurus.com
|
50
51
|
executables: []
|
51
52
|
|
52
53
|
extensions: []
|
@@ -62,6 +63,7 @@ files:
|
|
62
63
|
- amazon-ses-mailer.gemspec
|
63
64
|
- lib/amazon-ses-mailer.rb
|
64
65
|
- lib/amazon-ses-mailer/version.rb
|
66
|
+
- rails/init.rb
|
65
67
|
has_rdoc: true
|
66
68
|
homepage: ""
|
67
69
|
licenses: []
|