Skip to content
This repository
Newer
Older
100644 653 lines (608 sloc) 28.328 kb
616ebb8f »
2009-12-28 Remove unused code paths and require mail only when it's needed.
1 require 'mail'
a2880827 »
2009-12-30 Adding :transfer_encoding -> :content_transfer_encoding as part of Tm…
2 require 'action_mailer/tmail_compat'
c985a0ee »
2010-01-23 Add some tests to collector with templates and any.
3 require 'action_mailer/collector'
41af6d9a »
2010-03-17 Use Array.wrap not Array()
4 require 'active_support/core_ext/array/wrap'
a63caa4c »
2009-06-15 Get tests to run (with failures) without old base around
5
c4590d57 »
2006-03-28 Fixed docs
6 module ActionMailer #:nodoc:
98dc5827 »
2008-05-25 Merge docrails.
7 # Action Mailer allows you to send email from your application using a mailer model and views.
db045dbb »
2004-11-24 Initial
8 #
0a407bca »
2006-05-10 ActionMailer::Base documentation rewrite. Closes #4991 [Kevin Clark, …
9 # = Mailer Models
20bd4bd3 »
2006-09-02 Updated docs and otherwise
10 #
98dc5827 »
2008-05-25 Merge docrails.
11 # To use Action Mailer, you need to create a mailer model.
3b0e1d90 »
2008-05-14 Prefer string core_ext inflector methods over directly accessing Infl…
12 #
f44a0b1d »
2010-02-06 fix usage examples and more to use new invocations
13 # $ rails generate mailer Notifier
0a407bca »
2006-05-10 ActionMailer::Base documentation rewrite. Closes #4991 [Kevin Clark, …
14 #
4a6eba32 »
2010-01-25 Added initial documentation for the new API
15 # The generated model inherits from ActionMailer::Base. Emails are defined by creating methods
16 # within the model which are then used to set variables to be used in the mail template, to
17 # change options on the mail, or to add attachments.
0a407bca »
2006-05-10 ActionMailer::Base documentation rewrite. Closes #4991 [Kevin Clark, …
18 #
19 # Examples:
20 #
21 # class Notifier < ActionMailer::Base
452bb1e4 »
2010-01-27 Rename 'defaults' class method to 'default' to reflect that it's a de…
22 # default :from => 'no-reply@example.com',
23 # :return_path => 'system@example.com'
4a6eba32 »
2010-01-25 Added initial documentation for the new API
24 #
25 # def welcome(recipient)
26 # @account = recipient
65899765 »
2010-01-26 Remove old files, add some information to docs and improve test suite.
27 # mail(:to => recipient.email_address_with_name,
28 # :bcc => ["bcc@example.com", "Order Watcher <watcher@example.com>"])
4a6eba32 »
2010-01-25 Added initial documentation for the new API
29 # end
0a407bca »
2006-05-10 ActionMailer::Base documentation rewrite. Closes #4991 [Kevin Clark, …
30 # end
4a6eba32 »
2010-01-25 Added initial documentation for the new API
31 #
32 # Within the mailer method, you have access to the following methods:
33 #
34 # * <tt>attachments[]=</tt> - Allows you to add attachments to your email in an intuitive
35 # manner; <tt>attachments['filename.png'] = File.read('path/to/filename.png')</tt>
65899765 »
2010-01-26 Remove old files, add some information to docs and improve test suite.
36 #
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
37 # * <tt>headers[]=</tt> - Allows you to specify any header field in your email such
38 # as <tt>headers['X-No-Spam'] = 'True'</tt>. Note, while most fields (like <tt>To:</tt>
39 # <tt>From:</tt> can only appear once in an email header, other fields like <tt>X-Anything</tt>
40 # can appear multiple times. If you want to change a field that can appear multiple times,
41 # you need to set it to nil first so that Mail knows you are replacing it, not adding
42 # another field of the same name.)
65899765 »
2010-01-26 Remove old files, add some information to docs and improve test suite.
43 #
9520166f »
2010-01-27 Fixed up being able to pass random headers in with headers, or mail. …
44 # * <tt>headers(hash)</tt> - Allows you to specify multiple headers in your email such
45 # as <tt>headers({'X-No-Spam' => 'True', 'In-Reply-To' => '1234@message.id'})</tt>
46 #
4a6eba32 »
2010-01-25 Added initial documentation for the new API
47 # * <tt>mail</tt> - Allows you to specify your email to send.
48 #
9520166f »
2010-01-27 Fixed up being able to pass random headers in with headers, or mail. …
49 # The hash passed to the mail method allows you to specify any header that a Mail::Message
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
50 # will accept (any valid Email header including optional fields).
4a6eba32 »
2010-01-25 Added initial documentation for the new API
51 #
52 # The mail method, if not passed a block, will inspect your views and send all the views with
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
53 # the same name as the method, so the above action would send the +welcome.text.plain.erb+ view
54 # file as well as the +welcome.text.html.erb+ view file in a +multipart/alternative+ email.
4a6eba32 »
2010-01-25 Added initial documentation for the new API
55 #
56 # If you want to explicitly render only certain templates, pass a block:
57 #
58 # mail(:to => user.emai) do |format|
59 # format.text
60 # format.html
61 # end
20bd4bd3 »
2006-09-02 Updated docs and otherwise
62 #
65899765 »
2010-01-26 Remove old files, add some information to docs and improve test suite.
63 # The block syntax is useful if also need to specify information specific to a part:
64 #
65 # mail(:to => user.emai) do |format|
66 # format.text(:content_transfer_encoding => "base64")
67 # format.html
68 # end
69 #
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
70 # Or even to render a special view:
65899765 »
2010-01-26 Remove old files, add some information to docs and improve test suite.
71 #
72 # mail(:to => user.emai) do |format|
73 # format.text
74 # format.html { render "some_other_template" }
75 # end
76 #
20bd4bd3 »
2006-09-02 Updated docs and otherwise
77 # = Mailer views
78 #
4a6eba32 »
2010-01-25 Added initial documentation for the new API
79 # Like Action Controller, each mailer class has a corresponding view directory in which each
80 # method of the class looks for a template with its name.
81 #
82 # To define a template to be used with a mailing, create an <tt>.erb</tt> file with the same
83 # name as the method in your mailer model. For example, in the mailer defined above, the template at
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
84 # <tt>app/views/notifier/signup_notification.text.plain.erb</tt> would be used to generate the email.
0a407bca »
2006-05-10 ActionMailer::Base documentation rewrite. Closes #4991 [Kevin Clark, …
85 #
86 # Variables defined in the model are accessible as instance variables in the view.
87 #
88 # Emails by default are sent in plain text, so a sample view for our model example might look like this:
89 #
90 # Hi <%= @account.name %>,
91 # Thanks for joining our service! Please check back often.
92 #
20bd4bd3 »
2006-09-02 Updated docs and otherwise
93 # You can even use Action Pack helpers in these views. For example:
94 #
95 # You got a new note!
ee70d1b6 »
2009-12-25 adv_attr_accessors in ActionMailer are not sent to the views, use the…
96 # <%= truncate(@note.body, 25) %>
97 #
65899765 »
2010-01-26 Remove old files, add some information to docs and improve test suite.
98 # If you need to access the subject, from or the recipients in the view, you can do that through message object:
ee70d1b6 »
2009-12-25 adv_attr_accessors in ActionMailer are not sent to the views, use the…
99 #
65899765 »
2010-01-26 Remove old files, add some information to docs and improve test suite.
100 # You got a new note from <%= message.from %>!
ee70d1b6 »
2009-12-25 adv_attr_accessors in ActionMailer are not sent to the views, use the…
101 # <%= truncate(@note.body, 25) %>
3b0e1d90 »
2008-05-14 Prefer string core_ext inflector methods over directly accessing Infl…
102 #
20bd4bd3 »
2006-09-02 Updated docs and otherwise
103 #
4809dcc1 »
2008-04-21 * Remove default_url_options from mailer generator
104 # = Generating URLs
3b0e1d90 »
2008-05-14 Prefer string core_ext inflector methods over directly accessing Infl…
105 #
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
106 # URLs can be generated in mailer views using <tt>url_for</tt> or named routes. Unlike controllers from
107 # Action Pack, the mailer instance doesn't have any context about the incoming request, so you'll need
108 # to provide all of the details needed to generate a URL.
20bd4bd3 »
2006-09-02 Updated docs and otherwise
109 #
4809dcc1 »
2008-04-21 * Remove default_url_options from mailer generator
110 # When using <tt>url_for</tt> you'll need to provide the <tt>:host</tt>, <tt>:controller</tt>, and <tt>:action</tt>:
3b0e1d90 »
2008-05-14 Prefer string core_ext inflector methods over directly accessing Infl…
111 #
4809dcc1 »
2008-04-21 * Remove default_url_options from mailer generator
112 # <%= url_for(:host => "example.com", :controller => "welcome", :action => "greeting") %>
20bd4bd3 »
2006-09-02 Updated docs and otherwise
113 #
4809dcc1 »
2008-04-21 * Remove default_url_options from mailer generator
114 # When using named routes you only need to supply the <tt>:host</tt>:
3b0e1d90 »
2008-05-14 Prefer string core_ext inflector methods over directly accessing Infl…
115 #
4809dcc1 »
2008-04-21 * Remove default_url_options from mailer generator
116 # <%= users_url(:host => "example.com") %>
117 #
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
118 # You will want to avoid using the <tt>name_of_route_path</tt> form of named routes because it doesn't
119 # make sense to generate relative URLs in email messages.
4809dcc1 »
2008-04-21 * Remove default_url_options from mailer generator
120 #
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
121 # It is also possible to set a default host that will be used in all mailers by setting the <tt>:host</tt>
122 # option in the <tt>ActionMailer::Base.default_url_options</tt> hash as follows:
4809dcc1 »
2008-04-21 * Remove default_url_options from mailer generator
123 #
124 # ActionMailer::Base.default_url_options[:host] = "example.com"
3b0e1d90 »
2008-05-14 Prefer string core_ext inflector methods over directly accessing Infl…
125 #
dc4eec11 »
2008-05-09 Merge docrails:
126 # This can also be set as a configuration option in <tt>config/environment.rb</tt>:
4809dcc1 »
2008-04-21 * Remove default_url_options from mailer generator
127 #
128 # config.action_mailer.default_url_options = { :host => "example.com" }
20bd4bd3 »
2006-09-02 Updated docs and otherwise
129 #
4809dcc1 »
2008-04-21 * Remove default_url_options from mailer generator
130 # If you do decide to set a default <tt>:host</tt> for your mailers you will want to use the
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
131 # <tt>:only_path => false</tt> option when using <tt>url_for</tt>. This will ensure that absolute URLs are
132 # generated because the <tt>url_for</tt> view helper will, by default, generate relative URLs when a
133 # <tt>:host</tt> option isn't explicitly provided.
20bd4bd3 »
2006-09-02 Updated docs and otherwise
134 #
135 # = Sending mail
136 #
3b0e1d90 »
2008-05-14 Prefer string core_ext inflector methods over directly accessing Infl…
137 # Once a mailer action and template are defined, you can deliver your message or create it and save it
0a407bca »
2006-05-10 ActionMailer::Base documentation rewrite. Closes #4991 [Kevin Clark, …
138 # for delivery later:
139 #
4a6eba32 »
2010-01-25 Added initial documentation for the new API
140 # Notifier.welcome(david).deliver # sends the email
141 # mail = Notifier.welcome(david) # => a Mail::Message object
142 # mail.deliver # sends the email
0a407bca »
2006-05-10 ActionMailer::Base documentation rewrite. Closes #4991 [Kevin Clark, …
143 #
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
144 # You never instantiate your mailer class. Rather, you just call the method you defined on the class itself.
20bd4bd3 »
2006-09-02 Updated docs and otherwise
145 #
4a6eba32 »
2010-01-25 Added initial documentation for the new API
146 # = Multipart Emails
3b0e1d90 »
2008-05-14 Prefer string core_ext inflector methods over directly accessing Infl…
147 #
98dc5827 »
2008-05-25 Merge docrails.
148 # Multipart messages can also be used implicitly because Action Mailer will automatically
0a407bca »
2006-05-10 ActionMailer::Base documentation rewrite. Closes #4991 [Kevin Clark, …
149 # detect and use multipart templates, where each template is named after the name of the action, followed
150 # by the content type. Each such detected template will be added as separate part to the message.
3b0e1d90 »
2008-05-14 Prefer string core_ext inflector methods over directly accessing Infl…
151 #
0a407bca »
2006-05-10 ActionMailer::Base documentation rewrite. Closes #4991 [Kevin Clark, …
152 # For example, if the following templates existed:
21187c0f »
2007-02-21 Apply the rest of Chads patch
153 # * signup_notification.text.plain.erb
154 # * signup_notification.text.html.erb
155 # * signup_notification.text.xml.builder
65899765 »
2010-01-26 Remove old files, add some information to docs and improve test suite.
156 # * signup_notification.text.yaml.erb
3b0e1d90 »
2008-05-14 Prefer string core_ext inflector methods over directly accessing Infl…
157 #
4a6eba32 »
2010-01-25 Added initial documentation for the new API
158 # Each would be rendered and added as a separate part to the message, with the corresponding content
159 # type. The content type for the entire message is automatically set to <tt>multipart/alternative</tt>,
160 # which indicates that the email contains multiple different representations of the same email
161 # body. The same instance variables defined in the action are passed to all email templates.
359caef3 »
2005-05-29 A very thorough refactoring, resulting in new mail property setters a…
162 #
46f30f90 »
2008-05-16 Merge documentation changes from docrails.
163 # Implicit template rendering is not performed if any attachments or parts have been added to the email.
164 # This means that you'll have to manually add each part to the email and set the content type of the email
165 # to <tt>multipart/alternative</tt>.
20bd4bd3 »
2006-09-02 Updated docs and otherwise
166 #
0a407bca »
2006-05-10 ActionMailer::Base documentation rewrite. Closes #4991 [Kevin Clark, …
167 # = Attachments
20bd4bd3 »
2006-09-02 Updated docs and otherwise
168 #
4a6eba32 »
2010-01-25 Added initial documentation for the new API
169 # You can see above how to make a multipart HTML / Text email, to send attachments is just
170 # as easy:
0a407bca »
2006-05-10 ActionMailer::Base documentation rewrite. Closes #4991 [Kevin Clark, …
171 #
172 # class ApplicationMailer < ActionMailer::Base
4a6eba32 »
2010-01-25 Added initial documentation for the new API
173 # def welcome(recipient)
174 # attachments['free_book.pdf'] = { :data => File.read('path/to/file.pdf') }
175 # mail(:to => recipient, :subject => "New account information")
db045dbb »
2004-11-24 Initial
176 # end
3b0e1d90 »
2008-05-14 Prefer string core_ext inflector methods over directly accessing Infl…
177 # end
4a6eba32 »
2010-01-25 Added initial documentation for the new API
178 #
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
179 # Which will (if it had both a <tt>welcome.text.plain.erb</tt> and <tt>welcome.text.html.erb</tt>
180 # tempalte in the view directory), send a complete <tt>multipart/mixed</tt> email with two parts,
181 # the first part being a <tt>multipart/alternative</tt> with the text and HTML email parts inside,
182 # and the second being a <tt>application/pdf</tt> with a Base64 encoded copy of the file.pdf book
183 # with the filename +free_book.pdf+.
c927aa0f »
2004-12-16 Updated documentation
184 #
cefc136e »
2010-02-22 Adding options to register observers and interceptors through ActionM…
185 # = Observing and Intercepting Mails
186 #
187 # ActionMailer provides hooks into the Mail observer and interceptor methods. These allow you to
188 # register objects that are called during the mail delivery life cycle.
189 #
190 # An observer object must implement the <tt>:delivered_email(message)</tt> method which will be
191 # called once for every email sent after the email has been sent.
192 #
193 # An interceptor object must implement the <tt>:delivering_email(message)</tt> method which will be
194 # called before the email is sent, allowing you to make modifications to the email before it hits
195 # the delivery agents. Your object should make and needed modifications directly to the passed
196 # in Mail::Message instance.
20bd4bd3 »
2006-09-02 Updated docs and otherwise
197 #
c927aa0f »
2004-12-16 Updated documentation
198 # = Configuration options
199 #
200 # These options are specified on the class level, like <tt>ActionMailer::Base.template_root = "/my/templates"</tt>
201 #
452bb1e4 »
2010-01-27 Rename 'defaults' class method to 'default' to reflect that it's a de…
202 # * <tt>default</tt> - This is a class wide hash of <tt>:key => value</tt> pairs containing
21dcc20e »
2010-01-27 Fixed up documentation to reflect code change and cleaned up tests of…
203 # default values for the specified header fields of the <tt>Mail::Message</tt>. You can
204 # specify a default for any valid header for <tt>Mail::Message</tt> and it will be used if
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
205 # you do not override it. You pass in the header value as a symbol, all lower case with under
206 # scores instead of hyphens, so <tt>Content-Transfer-Encoding:</tt>
207 # becomes <tt>:content_transfer_encoding</tt>. The defaults set by Action Mailer are:
21dcc20e »
2010-01-27 Fixed up documentation to reflect code change and cleaned up tests of…
208 # * <tt>:mime_version => "1.0"</tt>
209 # * <tt>:charset => "utf-8",</tt>
210 # * <tt>:content_type => "text/plain",</tt>
211 # * <tt>:parts_order => [ "text/plain", "text/enriched", "text/html" ]</tt>
c927aa0f »
2004-12-16 Updated documentation
212 #
213 # * <tt>logger</tt> - the logger is used for generating information on the mailing run if available.
214 # Can be set to nil for no logging. Compatible with both Ruby's own Logger and Log4r loggers.
215 #
64092de2 »
2008-05-02 Improve documentation coverage and markup
216 # * <tt>smtp_settings</tt> - Allows detailed configuration for <tt>:smtp</tt> delivery method:
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
217 # * <tt>:address</tt> - Allows you to use a remote mail server. Just change it from its default
218 # "localhost" setting.
dc4eec11 »
2008-05-09 Merge docrails:
219 # * <tt>:port</tt> - On the off chance that your mail server doesn't run on port 25, you can change it.
220 # * <tt>:domain</tt> - If you need to specify a HELO domain, you can do it here.
221 # * <tt>:user_name</tt> - If your mail server requires authentication, set the username in this setting.
222 # * <tt>:password</tt> - If your mail server requires authentication, set the password in this setting.
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
223 # * <tt>:authentication</tt> - If your mail server requires authentication, you need to specify the
224 # authentication type here.
46f30f90 »
2008-05-16 Merge documentation changes from docrails.
225 # This is a symbol and one of <tt>:plain</tt>, <tt>:login</tt>, <tt>:cram_md5</tt>.
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
226 # * <tt>:enable_starttls_auto</tt> - When set to true, detects if STARTTLS is enabled in your SMTP server
227 # and starts to use it.
c927aa0f »
2004-12-16 Updated documentation
228 #
46f30f90 »
2008-05-16 Merge documentation changes from docrails.
229 # * <tt>sendmail_settings</tt> - Allows you to override options for the <tt>:sendmail</tt> delivery method.
230 # * <tt>:location</tt> - The location of the sendmail executable. Defaults to <tt>/usr/sbin/sendmail</tt>.
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
231 # * <tt>:arguments</tt> - The command line arguments. Defaults to <tt>-i -t</tt> with <tt>-f sender@addres</tt>
232 # added automatically before the message is sent.
dc4eec11 »
2008-05-09 Merge docrails:
233 #
fbe6c3c1 »
2009-08-07 Adds a :file delivery_method to save email to a file on disk
234 # * <tt>file_settings</tt> - Allows you to override options for the <tt>:file</tt> delivery method.
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
235 # * <tt>:location</tt> - The directory into which emails will be written. Defaults to the application
236 # <tt>tmp/mails</tt>.
fbe6c3c1 »
2009-08-07 Adds a :file delivery_method to save email to a file on disk
237 #
dc4eec11 »
2008-05-09 Merge docrails:
238 # * <tt>raise_delivery_errors</tt> - Whether or not errors should be raised if the email fails to be delivered.
c927aa0f »
2004-12-16 Updated documentation
239 #
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
240 # * <tt>delivery_method</tt> - Defines a delivery method. Possible values are <tt>:smtp</tt> (default),
241 # <tt>:sendmail</tt>, <tt>:test</tt>, and <tt>:file</tt>. Or you may provide a custom delivery method
242 # object eg. MyOwnDeliveryMethodClass.new. See the Mail gem documentation on the interface you need to
243 # implement for a custom delivery agent.
c927aa0f »
2004-12-16 Updated documentation
244 #
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
245 # * <tt>perform_deliveries</tt> - Determines whether emails are actually sent from Action Mailer when you
246 # call <tt>.deliver</tt> on an mail message or on an Action Mailer method. This is on by default but can
247 # be turned off to aid in functional testing.
c927aa0f »
2004-12-16 Updated documentation
248 #
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
249 # * <tt>deliveries</tt> - Keeps an array of all the emails sent out through the Action Mailer with
250 # <tt>delivery_method :test</tt>. Most useful for unit and functional testing.
af56c806 »
2005-02-24 Updated documentation
251 #
452bb1e4 »
2010-01-27 Rename 'defaults' class method to 'default' to reflect that it's a de…
252 # * <tt>default_charset</tt> - This is now deprecated, use the +default+ method above to
21dcc20e »
2010-01-27 Fixed up documentation to reflect code change and cleaned up tests of…
253 # set the default +:charset+.
c2e7851f »
2009-01-11 Add ActionMailer::Base#enable_starttls_auto option for enabling/disab…
254 #
452bb1e4 »
2010-01-27 Rename 'defaults' class method to 'default' to reflect that it's a de…
255 # * <tt>default_content_type</tt> - This is now deprecated, use the +default+ method above
21dcc20e »
2010-01-27 Fixed up documentation to reflect code change and cleaned up tests of…
256 # to set the default +:content_type+.
c2e7851f »
2009-01-11 Add ActionMailer::Base#enable_starttls_auto option for enabling/disab…
257 #
452bb1e4 »
2010-01-27 Rename 'defaults' class method to 'default' to reflect that it's a de…
258 # * <tt>default_mime_version</tt> - This is now deprecated, use the +default+ method above
21dcc20e »
2010-01-27 Fixed up documentation to reflect code change and cleaned up tests of…
259 # to set the default +:mime_version+.
c2e7851f »
2009-01-11 Add ActionMailer::Base#enable_starttls_auto option for enabling/disab…
260 #
452bb1e4 »
2010-01-27 Rename 'defaults' class method to 'default' to reflect that it's a de…
261 # * <tt>default_implicit_parts_order</tt> - This is now deprecated, use the +default+ method above
21dcc20e »
2010-01-27 Fixed up documentation to reflect code change and cleaned up tests of…
262 # to set the default +:parts_order+. Parts Order is used when a message is built implicitly
263 # (i.e. multiple parts are assembled from templates which specify the content type in their
264 # filenames) this variable controls how the parts are ordered.
4964d3b0 »
2009-12-22 Make ActionMailer::Base inherit from AbstractController::Base
265 class Base < AbstractController::Base
0d931fec »
2010-01-24 Finish cleaning up delivery methods implementation.
266 include DeliveryMethods, Quoting
f30d73ba »
2010-01-24 Add new class delivery method API.
267 abstract!
268
c03c40b4 »
2009-12-31 Expose a _render_partial hook as thhe _render_template one and make u…
269 include AbstractController::Logger
83f4d86a »
2009-12-20 Rename the RenderingController module to just plain Rendering
270 include AbstractController::Rendering
a9751a70 »
2009-10-17 Refactor ActionMailer layout and remove legacy one.
271 include AbstractController::Layouts
684c2dc2 »
2009-10-18 Remove ActionMailer helpers and rely on AbstractController one.
272 include AbstractController::Helpers
48a3985d »
2010-01-26 Also include translation in ActionMailer.
273 include AbstractController::Translation
359caef3 »
2005-05-29 A very thorough refactoring, resulting in new mail property setters a…
274
ee70d1b6 »
2009-12-25 adv_attr_accessors in ActionMailer are not sent to the views, use the…
275 helper ActionMailer::MailHelper
7409b734 »
2010-01-24 Some refactoring.
276
5dead5bb »
2010-01-24 Maintain old_api and deprecated_api in different files.
277 include ActionMailer::OldApi
f30d73ba »
2010-01-24 Add new class delivery method API.
278 include ActionMailer::DeprecatedApi
cefc136e »
2010-02-22 Adding options to register observers and interceptors through ActionM…
279
280 delegate :register_observer, :to => Mail
281 delegate :register_interceptor, :to => Mail
7409b734 »
2010-01-24 Some refactoring.
282
c927aa0f »
2004-12-16 Updated documentation
283 private_class_method :new #:nodoc:
db045dbb »
2004-11-24 Initial
284
e5ab4b0d »
2010-01-31 Convert to class_attribute
285 class_attribute :default_params
9dd65c36 »
2010-01-26 Make defaults accept a hash.
286 self.default_params = {
287 :mime_version => "1.0",
288 :charset => "utf-8",
289 :content_type => "text/plain",
290 :parts_order => [ "text/plain", "text/enriched", "text/html" ]
e5ab4b0d »
2010-01-31 Convert to class_attribute
291 }.freeze
e1c13186 »
2010-01-25 Added delivers_from.
292
39d6f9e1 »
2010-03-07 Make many parts of Rails lazy. In order to facilitate this,
293 ActionMailer.run_base_hooks(self)
294
eda17194 »
2005-07-31 ActionMailer::Base.deliver(email) had been accidentally removed, but …
295 class << self
0b05acd4 »
2010-01-26 Implementing class level :defaults hash, instead of delivers_from et al
296
bd5ed651 »
2007-11-26 Update ActionMailer so it treats ActionView the same way that ActionC…
297 def mailer_name
298 @mailer_name ||= name.underscore
299 end
0750304c »
2010-01-16 Migrated over to Mail doing delivery.
300 attr_writer :mailer_name
301 alias :controller_path :mailer_name
81c416b7 »
2009-10-28 More refactoring on ActionMailer::Base.
302
e5ab4b0d »
2010-01-31 Convert to class_attribute
303 def default(value = nil)
304 self.default_params = default_params.merge(value).freeze if value
305 default_params
9dd65c36 »
2010-01-26 Make defaults accept a hash.
306 end
307
59f1df1b »
2005-10-16 Update/extend ActionMailer documentation (rdoc)
308 # Receives a raw email, parses it into an email object, decodes it,
309 # instantiates a new mailer, and passes the email object to the mailer
98dc5827 »
2008-05-25 Merge docrails.
310 # object's +receive+ method. If you want your mailer to be able to
311 # process incoming messages, you'll need to implement a +receive+
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
312 # method that accepts the raw email string as a parameter:
59f1df1b »
2005-10-16 Update/extend ActionMailer documentation (rdoc)
313 #
314 # class MyMailer < ActionMailer::Base
315 # def receive(mail)
316 # ...
317 # end
318 # end
704daad7 »
2010-01-15 Ensure we just send Ruby Stdlib objects in ActionMailer notifications.
319 def receive(raw_mail)
320 ActiveSupport::Notifications.instrument("action_mailer.receive") do |payload|
321 mail = Mail.new(raw_mail)
322 set_payload_for_mail(payload, mail)
2a6bc126 »
2010-01-13 Add subscriber to ActionMailer.
323 new.receive(mail)
324 end
eda17194 »
2005-07-31 ActionMailer::Base.deliver(email) had been accidentally removed, but …
325 end
326
bb2c7b43 »
2010-01-29 Updating Action Mailer documentation
327 # Wraps an email delivery inside of Active Support Notifications instrumentation. This
328 # method is actually called by the <tt>Mail::Message</tt> object itself through a call back
329 # when you call <tt>:deliver</tt> on the Mail::Message, calling +deliver_mail+ directly
330 # and passing a Mail::Message will do nothing except tell the logger you sent the email.
e4a989e9 »
2010-01-25 Added delivery_handler method to mail and implemented in ActionMailer…
331 def deliver_mail(mail) #:nodoc:
99f960a3 »
2010-01-24 Handle some TODOs and deprecations.
332 ActiveSupport::Notifications.instrument("action_mailer.deliver") do |payload|
258ca148 »
2010-01-24 Delegated ActionMailer::Base.deliveries to Mail.deliveries, added cal…
333 self.set_payload_for_mail(payload, mail)
ace74974 »
2010-01-25 Got AM working with Mail yield on delivery_handler and updated tests
334 yield # Let Mail do the delivery actions
258ca148 »
2010-01-24 Delegated ActionMailer::Base.deliveries to Mail.deliveries, added cal…
335 end
336 end
337
99f960a3 »
2010-01-24 Handle some TODOs and deprecations.
338 def respond_to?(method, *args) #:nodoc:
339 super || action_methods.include?(method.to_s)
340 end
341
342 protected
343
704daad7 »
2010-01-15 Ensure we just send Ruby Stdlib objects in ActionMailer notifications.
344 def set_payload_for_mail(payload, mail) #:nodoc:
99f960a3 »
2010-01-24 Handle some TODOs and deprecations.
345 payload[:mailer] = self.name
c905fce3 »
2010-01-15 Add message_id to AM payload and don't send bcc and cc if they were n…
346 payload[:message_id] = mail.message_id
347 payload[:subject] = mail.subject
348 payload[:to] = mail.to
349 payload[:from] = mail.from
350 payload[:bcc] = mail.bcc if mail.bcc.present?
351 payload[:cc] = mail.cc if mail.cc.present?
352 payload[:date] = mail.date
353 payload[:mail] = mail.encoded
704daad7 »
2010-01-15 Ensure we just send Ruby Stdlib objects in ActionMailer notifications.
354 end
f30d73ba »
2010-01-24 Add new class delivery method API.
355
99f960a3 »
2010-01-24 Handle some TODOs and deprecations.
356 def method_missing(method, *args) #:nodoc:
f30d73ba »
2010-01-24 Add new class delivery method API.
357 if action_methods.include?(method.to_s)
358 new(method, *args).message
359 else
360 super
361 end
362 end
eda17194 »
2005-07-31 ActionMailer::Base.deliver(email) had been accidentally removed, but …
363 end
364
7409b734 »
2010-01-24 Some refactoring.
365 attr_internal :message
366
6ba94460 »
2010-01-23 Make implicit and explicit templates pass through the same part creat…
367 # Instantiate a new mailer object. If +method_name+ is not +nil+, the mailer
368 # will be initialized according to the named method. If not, the mailer will
369 # remain uninitialized (useful when you only need to invoke the "receive"
370 # method, for instance).
371 def initialize(method_name=nil, *args)
372 super()
7409b734 »
2010-01-24 Some refactoring.
373 @_message = Mail.new
6ba94460 »
2010-01-23 Make implicit and explicit templates pass through the same part creat…
374 process(method_name, *args) if method_name
375 end
376
4a6eba32 »
2010-01-25 Added initial documentation for the new API
377 # Allows you to pass random and unusual headers to the new +Mail::Message+ object
378 # which will add them to itself.
379 #
380 # headers['X-Special-Domain-Specific-Header'] = "SecretValue"
381 #
9520166f »
2010-01-27 Fixed up being able to pass random headers in with headers, or mail. …
382 # You can also pass a hash into headers of header field names and values, which
383 # will then be set on the Mail::Message object:
384 #
05c4ad9d »
2010-01-26 Tidy up tests and docs.
385 # headers 'X-Special-Domain-Specific-Header' => "SecretValue",
386 # 'In-Reply-To' => incoming.message_id
9520166f »
2010-01-27 Fixed up being able to pass random headers in with headers, or mail. …
387 #
4a6eba32 »
2010-01-25 Added initial documentation for the new API
388 # The resulting Mail::Message will have the following in it's header:
389 #
390 # X-Special-Domain-Specific-Header: SecretValue
7409b734 »
2010-01-24 Some refactoring.
391 def headers(args=nil)
392 if args
9520166f »
2010-01-27 Fixed up being able to pass random headers in with headers, or mail. …
393 @_message.headers(args)
7409b734 »
2010-01-24 Some refactoring.
394 else
395 @_message
396 end
397 end
c34cfcc2 »
2010-01-20 Created mail method for new API
398
4a6eba32 »
2010-01-25 Added initial documentation for the new API
399 # Allows you to add attachments to an email, like so:
400 #
401 # mail.attachments['filename.jpg'] = File.read('/path/to/filename.jpg')
402 #
403 # If you do this, then Mail will take the file name and work out the mime type
404 # set the Content-Type, Content-Disposition, Content-Transfer-Encoding and
405 # base64 encode the contents of the attachment all for you.
406 #
407 # You can also specify overrides if you want by passing a hash instead of a string:
408 #
409 # mail.attachments['filename.jpg'] = {:mime_type => 'application/x-gzip',
410 # :content => File.read('/path/to/filename.jpg')}
411 #
412 # If you want to use a different encoding than Base64, you can pass an encoding in,
413 # but then it is up to you to pass in the content pre-encoded, and don't expect
414 # Mail to know how to decode this data:
415 #
416 # file_content = SpecialEncode(File.read('/path/to/filename.jpg'))
417 # mail.attachments['filename.jpg'] = {:mime_type => 'application/x-gzip',
418 # :encoding => 'SpecialEncoding',
419 # :content => file_content }
420 #
421 # You can also search for specific attachments:
422 #
423 # # By Filename
424 # mail.attachments['filename.jpg'] #=> Mail::Part object or nil
425 #
426 # # or by index
427 # mail.attachments[0] #=> Mail::Part (first attachment)
428 #
7409b734 »
2010-01-24 Some refactoring.
429 def attachments
430 @_message.attachments
431 end
dcb92536 »
2010-01-22 Add basic template rendering to new DSL.
432
4a6eba32 »
2010-01-25 Added initial documentation for the new API
433 # The main method that creates the message and renders the email templates. There are
434 # two ways to call this method, with a block, or without a block.
435 #
65899765 »
2010-01-26 Remove old files, add some information to docs and improve test suite.
436 # Both methods accept a headers hash. This hash allows you to specify the most used headers
4a6eba32 »
2010-01-25 Added initial documentation for the new API
437 # in an email message, these are:
438 #
439 # * <tt>:subject</tt> - The subject of the message, if this is omitted, ActionMailer will
440 # ask the Rails I18n class for a translated <tt>:subject</tt> in the scope of
441 # <tt>[:actionmailer, mailer_scope, action_name]</tt> or if this is missing, will translate the
442 # humanized version of the <tt>action_name</tt>
443 # * <tt>:to</tt> - Who the message is destined for, can be a string of addresses, or an array
444 # of addresses.
0b05acd4 »
2010-01-26 Implementing class level :defaults hash, instead of delivers_from et al
445 # * <tt>:from</tt> - Who the message is from
4a6eba32 »
2010-01-25 Added initial documentation for the new API
446 # * <tt>:cc</tt> - Who you would like to Carbon-Copy on this email, can be a string of addresses,
447 # or an array of addresses.
448 # * <tt>:bcc</tt> - Who you would like to Blind-Carbon-Copy on this email, can be a string of
449 # addresses, or an array of addresses.
450 # * <tt>:reply_to</tt> - Who to set the Reply-To header of the email to.
451 # * <tt>:date</tt> - The date to say the email was sent on.
452 #
452bb1e4 »
2010-01-27 Rename 'defaults' class method to 'default' to reflect that it's a de…
453 # You can set default values for any of the above headers (except :date) by using the <tt>default</tt>
0b05acd4 »
2010-01-26 Implementing class level :defaults hash, instead of delivers_from et al
454 # class method:
455 #
9dd65c36 »
2010-01-26 Make defaults accept a hash.
456 # class Notifier < ActionMailer::Base
452bb1e4 »
2010-01-27 Rename 'defaults' class method to 'default' to reflect that it's a de…
457 # self.default :from => 'no-reply@test.lindsaar.net',
458 # :bcc => 'email_logger@test.lindsaar.net',
459 # :reply_to => 'bounces@test.lindsaar.net'
0b05acd4 »
2010-01-26 Implementing class level :defaults hash, instead of delivers_from et al
460 # end
461 #
4a6eba32 »
2010-01-25 Added initial documentation for the new API
462 # If you need other headers not listed above, use the <tt>headers['name'] = value</tt> method.
463 #
65899765 »
2010-01-26 Remove old files, add some information to docs and improve test suite.
464 # When a <tt>:return_path</tt> is specified as header, that value will be used as the 'envelope from'
4a6eba32 »
2010-01-25 Added initial documentation for the new API
465 # address for the Mail message. Setting this is useful when you want delivery notifications
466 # sent to a different address than the one in <tt>:from</tt>. Mail will actually use the
467 # <tt>:return_path</tt> in preference to the <tt>:sender</tt> in preference to the <tt>:from</tt>
468 # field for the 'envelope from' value.
469 #
470 # If you do not pass a block to the +mail+ method, it will find all templates in the
be35a151 »
2010-02-19 Allow to choose the template path and template name used in implicit …
471 # view paths using by default the mailer name and the method name that it is being
472 # called from, it will then create parts for each of these templates intelligently,
473 # making educated guesses on correct content type and sequence, and return a fully
474 # prepared Mail::Message ready to call <tt>:deliver</tt> on to send.
475 #
476 # For example:
477 #
478 # class Notifier < ActionMailer::Base
479 # default :from => 'no-reply@test.lindsaar.net',
480 #
481 # def welcome
482 # mail(:to => 'mikel@test.lindsaar.net')
483 # end
484 # end
485 #
486 # Will look for all templates at "app/views/notifier" with name "welcome". However, those
487 # can be customized:
488 #
489 # mail(:template_path => 'notifications', :template_name => 'another')
490 #
491 # And now it will look for all templates at "app/views/notifications" with name "another".
4a6eba32 »
2010-01-25 Added initial documentation for the new API
492 #
493 # If you do pass a block, you can render specific templates of your choice:
494 #
495 # mail(:to => 'mikel@test.lindsaar.net') do |format|
496 # format.text
497 # format.html
498 # end
499 #
500 # You can even render text directly without using a template:
501 #
502 # mail(:to => 'mikel@test.lindsaar.net') do |format|
503 # format.text { render :text => "Hello Mikel!" }
504 # format.html { render :text => "<h1>Hello Mikel!</h1>" }
505 # end
506 #
74a5889a »
2010-01-26 Refactor content type setting, added tests to ensure boundary exists …
507 # Which will render a <tt>multipart/alternative</tt> email with <tt>text/plain</tt> and
4a6eba32 »
2010-01-25 Added initial documentation for the new API
508 # <tt>text/html</tt> parts.
65899765 »
2010-01-26 Remove old files, add some information to docs and improve test suite.
509 #
510 # The block syntax also allows you to customize the part headers if desired:
511 #
512 # mail(:to => 'mikel@test.lindsaar.net') do |format|
513 # format.text(:content_transfer_encoding => "base64")
514 # format.html
515 # end
516 #
7409b734 »
2010-01-24 Some refactoring.
517 def mail(headers={}, &block)
518 # Guard flag to prevent both the old and the new API from firing
519 # Should be removed when old API is removed
520 @mail_was_called = true
521 m = @_message
258ca148 »
2010-01-24 Delegated ActionMailer::Base.deliveries to Mail.deliveries, added cal…
522
9dd65c36 »
2010-01-26 Make defaults accept a hash.
523 # At the beginning, do not consider class default for parts order neither content_type
524 content_type = headers[:content_type]
525 parts_order = headers[:parts_order]
1cd55928 »
2010-01-22 First work on implicit multipart.
526
9dd65c36 »
2010-01-26 Make defaults accept a hash.
527 # Merge defaults from class
452bb1e4 »
2010-01-27 Rename 'defaults' class method to 'default' to reflect that it's a de…
528 headers = headers.reverse_merge(self.class.default)
be35a151 »
2010-02-19 Allow to choose the template path and template name used in implicit …
529 charset = headers.delete(:charset)
0b05acd4 »
2010-01-26 Implementing class level :defaults hash, instead of delivers_from et al
530
9dd65c36 »
2010-01-26 Make defaults accept a hash.
531 # Quote fields
532 headers[:subject] ||= default_i18n_subject
7409b734 »
2010-01-24 Some refactoring.
533 quote_fields!(headers, charset)
951397b4 »
2010-01-22 Get implicit multipart and attachments working together.
534
7409b734 »
2010-01-24 Some refactoring.
535 # Render the templates and blocks
39a1b06f »
2010-01-26 Deprecate old defaults API.
536 responses, explicit_order = collect_responses_and_parts_order(headers, &block)
74a5889a »
2010-01-26 Refactor content type setting, added tests to ensure boundary exists …
537 create_parts_from_responses(m, responses, charset)
7409b734 »
2010-01-24 Some refactoring.
538
9dd65c36 »
2010-01-26 Make defaults accept a hash.
539 # Finally setup content type and parts order
540 m.content_type = set_content_type(m, content_type, headers[:content_type])
951397b4 »
2010-01-22 Get implicit multipart and attachments working together.
541 m.charset = charset
542
e7e4ed48 »
2010-01-24 Set sort order for explicit parts from the collector's template sequence
543 if m.multipart?
9dd65c36 »
2010-01-26 Make defaults accept a hash.
544 parts_order ||= explicit_order || headers[:parts_order]
545 m.body.set_sort_order(parts_order)
951397b4 »
2010-01-22 Get implicit multipart and attachments working together.
546 m.body.sort_parts!
547 end
bb9d71ff »
2010-01-22 Move class methods to deprecated stuff.
548
9dd65c36 »
2010-01-26 Make defaults accept a hash.
549 # Set configure delivery behavior
be35a151 »
2010-02-19 Allow to choose the template path and template name used in implicit …
550 wrap_delivery_behavior!(headers.delete(:delivery_method))
9dd65c36 »
2010-01-26 Make defaults accept a hash.
551
be35a151 »
2010-02-19 Allow to choose the template path and template name used in implicit …
552 # Remove any missing configuration header and assign all others
553 headers.except!(:parts_order, :content_type)
9dd65c36 »
2010-01-26 Make defaults accept a hash.
554 headers.each { |k, v| m[k] = v }
c34cfcc2 »
2010-01-20 Created mail method for new API
555 m
556 end
557
6ba94460 »
2010-01-23 Make implicit and explicit templates pass through the same part creat…
558 protected
559
9dd65c36 »
2010-01-26 Make defaults accept a hash.
560 def set_content_type(m, user_content_type, class_default)
74a5889a »
2010-01-26 Refactor content type setting, added tests to ensure boundary exists …
561 params = m.content_type_parameters || {}
562 case
563 when user_content_type.present?
564 user_content_type
565 when m.has_attachments?
566 ["multipart", "mixed", params]
567 when m.multipart?
568 ["multipart", "alternative", params]
569 else
b6b3db67 »
2010-01-28 Fixed bug on HTML only emails getting set to text/plain
570 m.content_type || class_default
74a5889a »
2010-01-26 Refactor content type setting, added tests to ensure boundary exists …
571 end
572 end
573
9dd65c36 »
2010-01-26 Make defaults accept a hash.
574 def default_i18n_subject #:nodoc:
5c3ef8c1 »
2010-01-23 Refactor subject with i18n.
575 mailer_scope = self.class.mailer_name.gsub('/', '.')
9dd65c36 »
2010-01-26 Make defaults accept a hash.
576 I18n.t(:subject, :scope => [:actionmailer, mailer_scope, action_name], :default => action_name.humanize)
5c3ef8c1 »
2010-01-23 Refactor subject with i18n.
577 end
578
73a90004 »
2010-01-24 Adding failing tests for calling just the action, instead of :create_…
579 # TODO: Move this into Mail
7409b734 »
2010-01-24 Some refactoring.
580 def quote_fields!(headers, charset) #:nodoc:
581 m = @_message
be35a151 »
2010-02-19 Allow to choose the template path and template name used in implicit …
582 m.subject ||= quote_if_necessary(headers.delete(:subject), charset) if headers[:subject]
583 m.to ||= quote_address_if_necessary(headers.delete(:to), charset) if headers[:to]
584 m.from ||= quote_address_if_necessary(headers.delete(:from), charset) if headers[:from]
585 m.cc ||= quote_address_if_necessary(headers.delete(:cc), charset) if headers[:cc]
586 m.bcc ||= quote_address_if_necessary(headers.delete(:bcc), charset) if headers[:bcc]
587 m.reply_to ||= quote_address_if_necessary(headers.delete(:reply_to), charset) if headers[:reply_to]
7409b734 »
2010-01-24 Some refactoring.
588 end
589
39a1b06f »
2010-01-26 Deprecate old defaults API.
590 def collect_responses_and_parts_order(headers) #:nodoc:
591 responses, parts_order = [], nil
7409b734 »
2010-01-24 Some refactoring.
592
593 if block_given?
594 collector = ActionMailer::Collector.new(self) { render(action_name) }
595 yield(collector)
39a1b06f »
2010-01-26 Deprecate old defaults API.
596 parts_order = collector.responses.map { |r| r[:content_type] }
7409b734 »
2010-01-24 Some refactoring.
597 responses = collector.responses
598 elsif headers[:body]
599 responses << {
be35a151 »
2010-02-19 Allow to choose the template path and template name used in implicit …
600 :body => headers.delete(:body),
452bb1e4 »
2010-01-27 Rename 'defaults' class method to 'default' to reflect that it's a de…
601 :content_type => self.class.default[:content_type] || "text/plain"
7409b734 »
2010-01-24 Some refactoring.
602 }
603 else
be35a151 »
2010-02-19 Allow to choose the template path and template name used in implicit …
604 templates_path = headers.delete(:template_path) || self.class.mailer_name
605 templates_name = headers.delete(:template_name) || action_name
606
607 each_template(templates_path, templates_name) do |template|
f28d856c »
2010-03-19 Improve performance of the rendering stack by freezing formats as a s…
608 self.formats = template.formats
609
7409b734 »
2010-01-24 Some refactoring.
610 responses << {
2a126868 »
2010-03-12 Allow anything that responds to render to be given as :template and u…
611 :body => render(:template => template),
7409b734 »
2010-01-24 Some refactoring.
612 :content_type => template.mime_type.to_s
613 }
614 end
615 end
616
39a1b06f »
2010-01-26 Deprecate old defaults API.
617 [responses, parts_order]
7409b734 »
2010-01-24 Some refactoring.
618 end
619
be35a151 »
2010-02-19 Allow to choose the template path and template name used in implicit …
620 def each_template(paths, name, &block) #:nodoc:
41af6d9a »
2010-03-17 Use Array.wrap not Array()
621 Array.wrap(paths).each do |path|
36eb1a68 »
2010-03-08 Bring AM up to date with new rendering stack.
622 templates = lookup_context.find_all(name, path)
00d6271d »
2010-03-09 Clean up the API required from ActionView::Template.
623 templates = templates.uniq_by { |t| t.formats }
0ece244f »
2010-01-24 Ensure implicit multipart templates with locale works as expected.
624
36eb1a68 »
2010-03-08 Bring AM up to date with new rendering stack.
625 unless templates.empty?
626 templates.each(&block)
627 return
99f960a3 »
2010-01-24 Handle some TODOs and deprecations.
628 end
629 end
630 end
631
6ba94460 »
2010-01-23 Make implicit and explicit templates pass through the same part creat…
632 def create_parts_from_responses(m, responses, charset) #:nodoc:
633 if responses.size == 1 && !m.has_attachments?
9dd65c36 »
2010-01-26 Make defaults accept a hash.
634 responses[0].each { |k,v| m[k] = v }
74a5889a »
2010-01-26 Refactor content type setting, added tests to ensure boundary exists …
635 elsif responses.size > 1 && m.has_attachments?
6ba94460 »
2010-01-23 Make implicit and explicit templates pass through the same part creat…
636 container = Mail::Part.new
74a5889a »
2010-01-26 Refactor content type setting, added tests to ensure boundary exists …
637 container.content_type = "multipart/alternative"
6ba94460 »
2010-01-23 Make implicit and explicit templates pass through the same part creat…
638 responses.each { |r| insert_part(container, r, charset) }
639 m.add_part(container)
640 else
641 responses.each { |r| insert_part(m, r, charset) }
642 end
359caef3 »
2005-05-29 A very thorough refactoring, resulting in new mail property setters a…
643 end
644
6ba94460 »
2010-01-23 Make implicit and explicit templates pass through the same part creat…
645 def insert_part(container, response, charset) #:nodoc:
646 response[:charset] ||= charset
647 part = Mail::Part.new(response)
648 container.add_part(part)
359caef3 »
2005-05-29 A very thorough refactoring, resulting in new mail property setters a…
649 end
3fad0cd0 »
2005-02-19 Added support for charsets for both subject and body. The default cha…
650
db045dbb »
2004-11-24 Initial
651 end
652 end
Something went wrong with that request. Please try again.