axtro-ar_mailer 2.1.6 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/action_mailer/ar_mailer.rb +12 -22
- data/lib/action_mailer/ar_sendmail.rb +1 -1
- metadata +14 -5
@@ -3,29 +3,19 @@
|
|
3
3
|
# ActionMailer.
|
4
4
|
#
|
5
5
|
|
6
|
-
class
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
#
|
11
|
-
@@email_class_name = 'Email'
|
12
|
-
|
13
|
-
def self.email_class=(klass)
|
14
|
-
@@email_class_name = klass.to_s
|
15
|
-
end
|
16
|
-
|
17
|
-
def self.email_class
|
18
|
-
@@email_class_name.constantize
|
6
|
+
class ARMailer
|
7
|
+
|
8
|
+
def initialize(options)
|
9
|
+
self.email_class = options[:email_class] || Email
|
19
10
|
end
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
self.
|
11
|
+
|
12
|
+
attr_accessor :email_class_name, :email_class
|
13
|
+
|
14
|
+
def deliver!(mail)
|
15
|
+
destinations = mail.destinations
|
16
|
+
sender = mail.return_path || mail.sender || mail.from_addrs.first
|
17
|
+
destinations.each do |destination|
|
18
|
+
self.email_class.create :mail => mail.encoded, :to => destination, :from => sender
|
28
19
|
end
|
29
20
|
end
|
30
|
-
|
31
21
|
end
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: axtro-ar_mailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 2
|
7
|
+
- 2
|
8
|
+
- 0
|
9
|
+
version: 2.2.0
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Eric Hodel
|
@@ -10,7 +15,7 @@ autorequire:
|
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
17
|
|
13
|
-
date:
|
18
|
+
date: 2010-08-28 00:00:00 +02:00
|
14
19
|
default_executable: ar_sendmail
|
15
20
|
dependencies: []
|
16
21
|
|
@@ -54,21 +59,25 @@ rdoc_options:
|
|
54
59
|
require_paths:
|
55
60
|
- lib
|
56
61
|
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
+
none: false
|
57
63
|
requirements:
|
58
64
|
- - ">="
|
59
65
|
- !ruby/object:Gem::Version
|
66
|
+
segments:
|
67
|
+
- 0
|
60
68
|
version: "0"
|
61
|
-
version:
|
62
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
63
71
|
requirements:
|
64
72
|
- - ">="
|
65
73
|
- !ruby/object:Gem::Version
|
74
|
+
segments:
|
75
|
+
- 0
|
66
76
|
version: "0"
|
67
|
-
version:
|
68
77
|
requirements: []
|
69
78
|
|
70
79
|
rubyforge_project: seattlerb
|
71
|
-
rubygems_version: 1.3.
|
80
|
+
rubygems_version: 1.3.7
|
72
81
|
signing_key:
|
73
82
|
specification_version: 3
|
74
83
|
summary: A two-phase delivery agent for ActionMailer
|