actionmailer 3.1.0.rc4 → 3.1.0.rc5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of actionmailer might be problematic. Click here for more details.
- data/lib/action_mailer/base.rb +12 -11
- data/lib/action_mailer/delivery_methods.rb +1 -1
- data/lib/action_mailer/version.rb +1 -1
- metadata +9 -18
data/lib/action_mailer/base.rb
CHANGED
@@ -58,7 +58,7 @@ module ActionMailer #:nodoc:
|
|
58
58
|
# will accept (any valid Email header including optional fields).
|
59
59
|
#
|
60
60
|
# The mail method, if not passed a block, will inspect your views and send all the views with
|
61
|
-
# the same name as the method, so the above action would send the +welcome.text.
|
61
|
+
# the same name as the method, so the above action would send the +welcome.text.erb+ view
|
62
62
|
# file as well as the +welcome.text.html.erb+ view file in a +multipart/alternative+ email.
|
63
63
|
#
|
64
64
|
# If you want to explicitly render only certain templates, pass a block:
|
@@ -89,7 +89,7 @@ module ActionMailer #:nodoc:
|
|
89
89
|
#
|
90
90
|
# To define a template to be used with a mailing, create an <tt>.erb</tt> file with the same
|
91
91
|
# name as the method in your mailer model. For example, in the mailer defined above, the template at
|
92
|
-
# <tt>app/views/notifier/
|
92
|
+
# <tt>app/views/notifier/welcome.text.erb</tt> would be used to generate the email.
|
93
93
|
#
|
94
94
|
# Variables defined in the model are accessible as instance variables in the view.
|
95
95
|
#
|
@@ -123,8 +123,9 @@ module ActionMailer #:nodoc:
|
|
123
123
|
#
|
124
124
|
# <%= users_url(:host => "example.com") %>
|
125
125
|
#
|
126
|
-
# You
|
127
|
-
#
|
126
|
+
# You should use the <tt>named_route_url</tt> style (which generates absolute URLs) and avoid using the
|
127
|
+
# <tt>named_route_path</tt> style (which generates relative URLs), since clients reading the mail will
|
128
|
+
# have no concept of a current URL from which to determine a relative path.
|
128
129
|
#
|
129
130
|
# It is also possible to set a default host that will be used in all mailers by setting the <tt>:host</tt>
|
130
131
|
# option as a configuration option in <tt>config/application.rb</tt>:
|
@@ -152,12 +153,12 @@ module ActionMailer #:nodoc:
|
|
152
153
|
#
|
153
154
|
# = Multipart Emails
|
154
155
|
#
|
155
|
-
# Multipart messages can also be used implicitly because Action Mailer will automatically
|
156
|
-
#
|
157
|
-
#
|
156
|
+
# Multipart messages can also be used implicitly because Action Mailer will automatically detect and use
|
157
|
+
# multipart templates, where each template is named after the name of the action, followed by the content
|
158
|
+
# type. Each such detected template will be added as a separate part to the message.
|
158
159
|
#
|
159
160
|
# For example, if the following templates exist:
|
160
|
-
# * signup_notification.text.
|
161
|
+
# * signup_notification.text.erb
|
161
162
|
# * signup_notification.text.html.erb
|
162
163
|
# * signup_notification.text.xml.builder
|
163
164
|
# * signup_notification.text.yaml.erb
|
@@ -182,7 +183,7 @@ module ActionMailer #:nodoc:
|
|
182
183
|
# end
|
183
184
|
# end
|
184
185
|
#
|
185
|
-
# Which will (if it had both a <tt>welcome.text.
|
186
|
+
# Which will (if it had both a <tt>welcome.text.erb</tt> and <tt>welcome.text.html.erb</tt>
|
186
187
|
# template in the view directory), send a complete <tt>multipart/mixed</tt> email with two parts,
|
187
188
|
# the first part being a <tt>multipart/alternative</tt> with the text and HTML email parts inside,
|
188
189
|
# and the second being a <tt>application/pdf</tt> with a Base64 encoded copy of the file.pdf book
|
@@ -383,8 +384,8 @@ module ActionMailer #:nodoc:
|
|
383
384
|
Mail.register_observer(delivery_observer)
|
384
385
|
end
|
385
386
|
|
386
|
-
# Register an
|
387
|
-
# Either a class or a string can be passed in as the
|
387
|
+
# Register an Interceptor which will be called before mail is sent.
|
388
|
+
# Either a class or a string can be passed in as the Interceptor. If a string is passed in
|
388
389
|
# it will be <tt>constantize</tt>d.
|
389
390
|
def register_interceptor(interceptor)
|
390
391
|
delivery_interceptor = (interceptor.is_a?(String) ? interceptor.constantize : interceptor)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'tmpdir'
|
2
2
|
|
3
3
|
module ActionMailer
|
4
|
-
# This
|
4
|
+
# This module handles everything related to mail delivery, from registering new
|
5
5
|
# delivery methods to configuring the mail object to be sent.
|
6
6
|
module DeliveryMethods
|
7
7
|
extend ActiveSupport::Concern
|
metadata
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionmailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease: 6
|
4
|
+
prerelease: true
|
6
5
|
segments:
|
7
6
|
- 3
|
8
7
|
- 1
|
9
8
|
- 0
|
10
|
-
-
|
11
|
-
|
12
|
-
version: 3.1.0.rc4
|
9
|
+
- rc5
|
10
|
+
version: 3.1.0.rc5
|
13
11
|
platform: ruby
|
14
12
|
authors:
|
15
13
|
- David Heinemeier Hansson
|
@@ -17,35 +15,31 @@ autorequire:
|
|
17
15
|
bindir: bin
|
18
16
|
cert_chain: []
|
19
17
|
|
20
|
-
date: 2011-
|
18
|
+
date: 2011-07-25 00:00:00 -07:00
|
19
|
+
default_executable:
|
21
20
|
dependencies:
|
22
21
|
- !ruby/object:Gem::Dependency
|
23
22
|
name: actionpack
|
24
23
|
prerelease: false
|
25
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
25
|
requirements:
|
28
26
|
- - "="
|
29
27
|
- !ruby/object:Gem::Version
|
30
|
-
hash: 15424109
|
31
28
|
segments:
|
32
29
|
- 3
|
33
30
|
- 1
|
34
31
|
- 0
|
35
|
-
-
|
36
|
-
|
37
|
-
version: 3.1.0.rc4
|
32
|
+
- rc5
|
33
|
+
version: 3.1.0.rc5
|
38
34
|
type: :runtime
|
39
35
|
version_requirements: *id001
|
40
36
|
- !ruby/object:Gem::Dependency
|
41
37
|
name: mail
|
42
38
|
prerelease: false
|
43
39
|
requirement: &id002 !ruby/object:Gem::Requirement
|
44
|
-
none: false
|
45
40
|
requirements:
|
46
41
|
- - ~>
|
47
42
|
- !ruby/object:Gem::Version
|
48
|
-
hash: 3
|
49
43
|
segments:
|
50
44
|
- 2
|
51
45
|
- 3
|
@@ -81,6 +75,7 @@ files:
|
|
81
75
|
- lib/rails/generators/mailer/mailer_generator.rb
|
82
76
|
- lib/rails/generators/mailer/templates/mailer.rb
|
83
77
|
- lib/rails/generators/mailer/USAGE
|
78
|
+
has_rdoc: true
|
84
79
|
homepage: http://www.rubyonrails.org
|
85
80
|
licenses: []
|
86
81
|
|
@@ -90,22 +85,18 @@ rdoc_options: []
|
|
90
85
|
require_paths:
|
91
86
|
- lib
|
92
87
|
required_ruby_version: !ruby/object:Gem::Requirement
|
93
|
-
none: false
|
94
88
|
requirements:
|
95
89
|
- - ">="
|
96
90
|
- !ruby/object:Gem::Version
|
97
|
-
hash: 57
|
98
91
|
segments:
|
99
92
|
- 1
|
100
93
|
- 8
|
101
94
|
- 7
|
102
95
|
version: 1.8.7
|
103
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
|
-
none: false
|
105
97
|
requirements:
|
106
98
|
- - ">"
|
107
99
|
- !ruby/object:Gem::Version
|
108
|
-
hash: 25
|
109
100
|
segments:
|
110
101
|
- 1
|
111
102
|
- 3
|
@@ -114,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
105
|
requirements:
|
115
106
|
- none
|
116
107
|
rubyforge_project:
|
117
|
-
rubygems_version: 1.
|
108
|
+
rubygems_version: 1.3.6
|
118
109
|
signing_key:
|
119
110
|
specification_version: 3
|
120
111
|
summary: Email composition, delivery, and receiving framework (part of Rails).
|