diff options
author | José Valim <jose.valim@gmail.com> | 2010-04-12 10:25:02 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-04-12 10:25:02 +0200 |
commit | b5f9a9fce316e96ffb9ab3a69e9311f8b1e56fde (patch) | |
tree | faee771eeeb2b7bef358c920e36513d242f0399f /actionmailer/lib/action_mailer/old_api.rb | |
parent | e5f392ce8ffe2a7fd3bd920132c4cdba8d207a4a (diff) | |
download | rails-b5f9a9fce316e96ffb9ab3a69e9311f8b1e56fde.tar.gz rails-b5f9a9fce316e96ffb9ab3a69e9311f8b1e56fde.tar.bz2 rails-b5f9a9fce316e96ffb9ab3a69e9311f8b1e56fde.zip |
Move set_fields! to the old API module.
Diffstat (limited to 'actionmailer/lib/action_mailer/old_api.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/old_api.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/old_api.rb b/actionmailer/lib/action_mailer/old_api.rb index 24c6ec8eda..b2111209c7 100644 --- a/actionmailer/lib/action_mailer/old_api.rb +++ b/actionmailer/lib/action_mailer/old_api.rb @@ -143,7 +143,7 @@ module ActionMailer { :content_type => content_type, :content_disposition => content_disposition }.merge(params) end - + def create_mail m = @_message @@ -230,6 +230,17 @@ module ActionMailer ) end + def set_fields!(headers, charset) #:nodoc: + m = @_message + m.charset = charset + m.subject ||= headers.delete(:subject) if headers[:subject] + m.to ||= headers.delete(:to) if headers[:to] + m.from ||= headers.delete(:from) if headers[:from] + m.cc ||= headers.delete(:cc) if headers[:cc] + m.bcc ||= headers.delete(:bcc) if headers[:bcc] + m.reply_to ||= headers.delete(:reply_to) if headers[:reply_to] + end + def split_content_type(ct) ct.to_s.split("/") end |